[thelist] ASP/TSQL/UID

Means, Eric D eric.d.means at boeing.com
Wed Oct 2 11:49:01 CDT 2002


-----Original Message-----
From: Anthony Baratta [mailto:Anthony at Baratta.com]
Sent: Wednesday, October 02, 2002 11:44 AM
To: thelist at lists.evolt.org
Subject: RE: [thelist] ASP/TSQL/UID

> With ADO to test for an empty record set you check to see
> if the record set is at the begining and the end simultaneously.
> That condition is only true for empty record sets.

Yes, but doing so is often unnecessary in practice, because if a recordset
is empty then EOF will always be true anyway -- so a construction like
If Not (rs.EOF And rs.BOF) Then
  Do While Not rs.EOF
    ...
  Loop
End If

Is functionally exactly equivalent to
Do While Not rs.EOF
  ...
Loop

The only time I can see checking both BOF and EOF is if you for some reason
need to report that no rows were returned.



More information about the thelist mailing list