0

i have a problem.. please help me..I have only one combo box and i want my combo box to have its value and i want to get it's value from my database??? how can i get that?? please help me to do this. thanks. here is my code please help me to fix this.


con.Open()
cmd.CommandText = "Select Description from Type where Description = Description "

cmd.Connection = con
Dim reader As SqlDataReader = cmd.ExecuteReader
While reader.Read

ComboBox1.SelectedItem = reader("Description")

End While

4
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by babbu
0

Frnd tell me one thing u want to select item from combobox or u want to add the item to the combobox,dat u retrieve from the database

0

i have a problem.. please help me..I have only one combo box and i want my combo box to have its value and i want to get it's value from my database??? how can i get that?? please help me to do this. thanks. here is my code please help me to fix this.


con.Open()
cmd.CommandText = "Select Description from Type where Description = Description "

cmd.Connection = con
Dim reader As SqlDataReader = cmd.ExecuteReader
While reader.Read

ComboBox1.SelectedItem = reader("Description")

End While

Try this...

ComboBox1.Text = reader("Description")
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.