Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003

    Fetch emp salary against its Employee ID


    I am doing an assignment..... and need some help.

    The application i am working is connected to sql server 2000 as database. And vb 6 as front end.
    I have a form with multiple fields. What i want is ... that when i enter an employees Id in the field... On its lost focus event, The application populates the salary field of the form against that ID.

    Hope u understand. So thanks for any help.

  2. #2
    Join Date
    Jun 2003
    You could write a Stored Procedure on your database that returns the salary for a given EmployeeID. For something as simple as this you could also send a direct SQL query and process the results, but I hope you have some security or verification scheme for this and a stored procedure will give you more functionality.


  3. #3
    Join Date
    Feb 2002
    You can create a 2nd recordset object that either runs a stored procedure or a select query. Then, use the result from this recordset to populate the field.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts