[2008] How to select data from sql table to string value?
Hi All:
my sql2008 table is :
HTML Code:
T1:
Code(*) Genus
-------- ------
SA10 A1
SA11 A2
SA12 A3
Code:
Dim a As New DataTable
Dim b As New SqlDataAdapter
b.SelectCommand = New SqlCommand("SELECT * FROM T1 ORDER BY Genus ASC", M)
b.Fill(a)
ComboBox1.DataSource = a
ComboBox1.DisplayMember = "Genus"
I want when select item from combobox1 then filled Selecteditem(from Combobox1) 'Code' to string value.
how to do?
Re: [2008] How to select data from sql table to string value?
Code:
"SELECT genus FROM T1 WHERE CODE = '" & Combobox1.Text & "' "
Is that what you mean?
Re: [2008] How to select data from sql table to string value?