Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 11th, 2004, 3:40 AM   #1
shylesh
Newbie
 
Join Date: Nov 2004
Posts: 1
Rep Power: 0 shylesh is on a distinguished road
I have a combobox in my form which shows the employee names.If I select one of the names from it I want its corresponding employee id stored in the database.How can I do this?Please help me.Thanks in advance
shylesh is offline   Reply With Quote
Old Dec 13th, 2004, 2:00 AM   #2
Xyler
Newbie
 
Join Date: Sep 2004
Location: South Africa, Eastern Cape
Posts: 28
Rep Power: 0 Xyler is on a distinguished road
You can either bind all the items on the form including the combo box or you can use a SQL statement. You then manually add the information to the components on the form. The SQL statement will be as a normal SQL statement except at the end you will have WHERE empName='" & addVarNameHere & "';". This might not be the best way, but it is a way.
__________________
Be vewwy vewwy quiet. I'm hunting wuntime ewwors.
Xyler is offline   Reply With Quote
Old Dec 16th, 2004, 4:53 AM   #3
bunker
Newbie
 
Join Date: Dec 2004
Location: Serbia
Posts: 4
Rep Power: 0 bunker is on a distinguished road
Send a message via ICQ to bunker
ComboBox.DataSource = Employees // SomeArrayof employees(ArrayList, Array, Collection)
ComboBox.Displaymember = EmployeeName
ComboBox.ValueMember = EmployeeId

if you call ComboBox.SelectedValue you will get employee Id value
__________________
Try ProjectTracking.NET tool, complete online project tracking solution. ProjectTracking.NET is designed to simplify development and management of small and medium sized projects for dislocated teams. Read more about Project Tracking here: http://www.ilumnis.com/Products/ProjectTracking.aspx
bunker is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:22 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC