P
Paul
I use the following to populate a listbox (exert) :
sql = "Select CONTACT_ID, CONTACT_NAME from tblContact WHERE CONTACT_DELETE
<> 1 AND CONTACT_NAME LIKE " & "'%" & Me.txtSearchName.Text & "%'" & " order
by CONTACT_NAME"
' Me.Label1.Text = sql
Dim conn As New OdbcConnection(strConn)
Dim Cmd As New OdbcCommand(sql, conn)
Dim objDR As OdbcDataReader
conn.Open()
objDR = Cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
emplist.DataSource = objDR
emplist.DataValueField = "CONTACT_ID"
emplist.DataTextField = "CONTACT_NAME"
emplist.DataBind()
Can someone tell me how I would detect if there where no records returned ?
Thanks in Advance
sql = "Select CONTACT_ID, CONTACT_NAME from tblContact WHERE CONTACT_DELETE
<> 1 AND CONTACT_NAME LIKE " & "'%" & Me.txtSearchName.Text & "%'" & " order
by CONTACT_NAME"
' Me.Label1.Text = sql
Dim conn As New OdbcConnection(strConn)
Dim Cmd As New OdbcCommand(sql, conn)
Dim objDR As OdbcDataReader
conn.Open()
objDR = Cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
emplist.DataSource = objDR
emplist.DataValueField = "CONTACT_ID"
emplist.DataTextField = "CONTACT_NAME"
emplist.DataBind()
Can someone tell me how I would detect if there where no records returned ?
Thanks in Advance