suryatiakz
Member
- Joined
- Oct 2, 2010
- Messages
- 7
- Programming Experience
- Beginner
myComboBox.DisplayMember = "Name"
myComboBox.ValueMember = "ID"
myComboBox.DataSource = myDataTable
Using connection As New SqlConnection("connection string here")
Using command As New SqlCommand("SELECT * FROM MyTable WHERE ID = @ID", connection)
command.Parameters.AddWithValue("@ID", CInt(myComboBox.SelectedValue))