Hi everybody,
this must be a silly question, but I can't remember (or find) how to check if my qry retrieved any records.
Where and how can I check for that? Any suggestions is greatly appreciated.
Here is some of my code:
Dim DS As New DataSet
Dim Conn = New OdbcConnection(DB2 + UID + ";pwd=" + gsPWD + ";")
Conn.Open()
Dim query As String = "select * from table where field =" & TextBox2.Text
Dim DA As New OdbcDataAdapter
DA.SelectCommand = New OdbcCommand(query, Conn)
Try
DA.Fill(DS, "TA1")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
TextBox1.DataBindings.Clear()
TextBox1.DataBindings.Add(New Binding("Text", DS, "TA1.VNDR_BUS_NO"))
Conn.close()
Thank you very much,
Steve
this must be a silly question, but I can't remember (or find) how to check if my qry retrieved any records.
Where and how can I check for that? Any suggestions is greatly appreciated.
Here is some of my code:
Dim DS As New DataSet
Dim Conn = New OdbcConnection(DB2 + UID + ";pwd=" + gsPWD + ";")
Conn.Open()
Dim query As String = "select * from table where field =" & TextBox2.Text
Dim DA As New OdbcDataAdapter
DA.SelectCommand = New OdbcCommand(query, Conn)
Try
DA.Fill(DS, "TA1")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
TextBox1.DataBindings.Clear()
TextBox1.DataBindings.Add(New Binding("Text", DS, "TA1.VNDR_BUS_NO"))
Conn.close()
Thank you very much,
Steve