i want to populate a listbox from a sql database and foll is the code i encountered error with:
Dim con As SqlConnection
Dim cmd As SqlCommand
Dim lrd As SqlDataReader
Dim dsitemlist As New DataSet

con = New SqlConnection("Data Source=DHAVAL-PC\SQLEXPRESS;Initial Catalog=final;Integrated Security=True")
'cmd = New SqlCommand("select Stud_RollNo from StudentDetails", con)
Dim temp As New SqlDataAdapter
ComboBox1.DataSource = dsitemlist
ComboBox1.DisplayMember = "Stud_RollNo"


i find error at temp.fill(dsitemlist).......
kindly help

You aren't linking the command object to the dataAdapter so your dataAdapter doesn't know what to do.

Dim temp As New SqlDataAdapter(cmd)