Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 02: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, 13:23
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 9,291
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, 23: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

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