Hi, I'm trying to populate a list box with data from a sql database, I would like to have all the information from a row in the database displayed on one line one the list box. Also when the get button is pressed to take the IDNumber aand convert it to a string. heres what I have...
list box code...
Dim dataset1 As New DataSet
dataAda.Fill(dataset1, "TestTable")
ListBox1.DataSource = dataset1.Tables("TestTable
")
ListBox1.DisplayMember = "IDNumber" "," "name" "," "age"
button code
Dim testString as string
testString = Listbox1.selectedItem("IDn
umber")
I know the code wont run, but I have no idea how to set about achieving what I want and its a start I guess, so if theres anyone that can help me? thanks
Start Free Trial