VB.NET 2002/2003 BasicsFor coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).

Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .

Please help me solve this problem(see source code on flollowing): When form load, in combo box will have 3 items with description what I would. But when I click Select button to show it's value then it will return: "ExamID" is the same with property that I assign for it while bind data.
For Example:
DisplayMember: Exam 1, Exam2 ,...OK
ValueMember: "ExamID" string. what I need: 1,2,...

I tried but I could not debug this problem.

Please help me....

Thank you very much

SOURCE CODE:

Private Sub BindData()

Dim conn As New OleDbConnection(DbObject.CONNECTION_STRING)
Dim cmd As New OleDbCommand("SELECT ExamID, Description FROM ExamEN", conn)
Dim adapter As New OleDbDataAdapter(cmd)
Dim ds As New DataSet