No records retrived..?

  • Thread starter Thread starter Kent Johnson
  • Start date Start date
K

Kent Johnson

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?

/Kent J.
 
I prefer
if(myDs != null && myDs.Tab....

since myDS can be null and the call to examine count will blow up. You knew
that but I wasn't sure others knew it.

regards
 
Back
Top