If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Chit Chat > Fetch emp salary against its Employee ID

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-04-03, 01:44
ishrat khan ishrat khan is offline
Registered User
 
Join Date: Oct 2003
Posts: 14
Fetch emp salary against its Employee ID

Hi...

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.
Reply With Quote
  #2 (permalink)  
Old 12-04-03, 12:23
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
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.

blindman
Reply With Quote
  #3 (permalink)  
Old 12-04-03, 22:59
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On