Hi all,
I have the following:
==================
SQLSelect = "SELECT * from MyTable where Field1='" & strVar & "'"
Dim mySqlDA As New System.Data.SqlClient.SqlDataAdapter(SQLSelect, strConn)
Dim myDS As New System.Data.DataSet()
mySqlDA.Fill(myDS)
===================
..how can I handle the case if no records are retrived from the
SQL-statement?
I want to check the datset before proceeding.
Something like:
If isnull(myDS)=true then
Label1.Text="'What you asked for doesn't exist!"
exit sub
endif
/Kent J.
I have the following:
==================
SQLSelect = "SELECT * from MyTable where Field1='" & strVar & "'"
Dim mySqlDA As New System.Data.SqlClient.SqlDataAdapter(SQLSelect, strConn)
Dim myDS As New System.Data.DataSet()
mySqlDA.Fill(myDS)
===================
..how can I handle the case if no records are retrived from the
SQL-statement?
I want to check the datset before proceeding.
Something like:
If isnull(myDS)=true then
Label1.Text="'What you asked for doesn't exist!"
exit sub
endif
/Kent J.