Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6794667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:14:59+00:00 2026-05-26T18:14:59+00:00

I’m writing a program for Employees Management and i need to automatically generate a

  • 0

I’m writing a program for Employees Management and i need to automatically generate a Payroll for each one then calculate some things and save it to another table.

I know how to calculate and save. I just need to get all the ID column of all rows in my Employees table, and select each Employee ID one by one in order to calculate each payroll automatically.

I’d appreciate your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:14:59+00:00Added an answer on May 26, 2026 at 6:14 pm

    If the information you need to look up based on the employeeID is in one other table, you may wish to use an Inner Join to select all the SQL data you need at once. Something like this:

    SELECT tblEmployee.EmployeeID, PayRate FROM tblEmployee INNER JOIN tblPayRates ON tblEmployee.EmployeeID= tblPayRates.EmployeeID
    

    In the select make sure you add the table name for any fields that are the same in both tables. Then you could make a list of items that hold all the data you collected, or calculate and store that information in whatever format you need it.

    If you really only want the Ids from a single table that would look like this:

    SELECT EmployeeID FROM tblEmployee
    

    The code for generating the query and getting results will look something like this:

        Dim cn As New MySqlConnection(ConnectionString)
        Dim cmd As New MySqlCommand(Query, cn)
        Dim reader As MySqlDataReader = cmd.ExecuteReader
        Dim IdList as new List(Of Integer)
    
        Do While reader.Read
            IdList.add(reader.GetInt32(0))
        Loop
    
        reader.Close()
        cmd.Dispose()
        cn.Close()
    

    I used a list of Integer to hold the result since I am not sure what type your ID is.

    If you have more than one field in the select you would add it to the loop, changing the type you are getting if necessary and then incrementing the index (reader.GetString(1) for example)

    I am not sure which part of all this you weren’t sure how to proceed with… so I hope this went the right direction.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I need a function that will clean a strings' special characters. I do NOT
I am writing an app with both english and french support. The app requests

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.