[thelist] ASP/TSQL/UID
Anthony Baratta
Anthony at Baratta.com
Wed Oct 2 11:45:01 CDT 2002
At 09:25 AM 10/2/2002, David.Cantrell at Gunter.AF.mil wrote:
> >If Not objRS.BOF And objRS.EOF Then
> > While Not objRS.EOF
>
>Is there any reason you want to check for BOF here? When created the
>recordset will start at BOF, so if you check for NOT BOF, then it will
>return false. Also, if it's at BOF it isn't at EOF, so the second check
>returns false as well.
You are correct that the if statement is setup wrong, he needs () to force
the not to evaluate both statements not just the first one.
If Not (objRS.BOF And objRS.EOF) Then
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.
--
Anthony Baratta
President
Keyboard Jockeys
"Conformity is the refuge of the unimaginative."
More information about the thelist
mailing list