QuestionTime
New member
- Joined
- Jul 29, 2006
- Messages
- 4
- Programming Experience
- Beginner
Hi guys:
I was wondering when using datareader to loop through DB records like the following code:
While DBDataReader.Read
cboCombox.Items.Add(DBDataReader(sColName))
End While
It will inserted as display Member in the combo box, however, it will never insert value member to it. Let's say my SQL statement = "Select Name, ID from Customers". What I would want to insert the Name as display member and ID as value member.
I knew it can be done by assign the dataset to datasource, however, I will lose ability to enter the custome text like "==== Select All ====".
If you have an idea how to assign value member through DataReader, please let me know.
Thank you so much.
I was wondering when using datareader to loop through DB records like the following code:
While DBDataReader.Read
cboCombox.Items.Add(DBDataReader(sColName))
End While
It will inserted as display Member in the combo box, however, it will never insert value member to it. Let's say my SQL statement = "Select Name, ID from Customers". What I would want to insert the Name as display member and ID as value member.
I knew it can be done by assign the dataset to datasource, however, I will lose ability to enter the custome text like "==== Select All ====".
If you have an idea how to assign value member through DataReader, please let me know.
Thank you so much.