Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty recordset 1

Status
Not open for further replies.

developer155

Programmer
Jan 21, 2004
512
0
0
US
How do I check for an empty recordset (when the quesry does nto return any records). When I do this I get an error that object reference was not set:
Do Until rs.EOF

I also get the same error when I do this:
If rs.Fields.FieldCount>0

thansk!
 
This is the C# forum, so you'd say it like:
Code:
if (rs != null)
{
  while (!rs.Eof())
  {
    // Code to access each row here
  }
}
Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top