Using Data from Recordset
Hi, this is probably the worse question anyone has asked, but here goes.
I have a connection to my sql db, using vb05, I can dump the recordset into a datagridview object with little effort, but, when querying for single record and single field, I cant seem to dump the returned value to a variable,
' Dim y As Integer
Dim sql As String
Dim series As String
sql = "select Series from ModelMstr where partno='" + Part + "'"
Dim cmd As SqlCommand
cmd = New SqlCommand(sql, sqlConnect)
Dim adapter As SqlDataAdapter
adapter = New SqlDataAdapter(cmd)
Dim row As Integer
Dim ds As DataSet
ds = New DataSet()
'Dim x As String
Me.DataGridView1.DataSource = ds
Me.DataGridView1.DataSource = ds.Tables(0)
Me.ComboBox1.DataSource = ds
Me.ComboBox1.DataSource = ds.Tables(0)
Me.ComboBox1.DisplayMember = "PartNumber"