Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback: irt.org FAQ Knowledge Base Q5822

Feedback on:
irt.org FAQ Knowledge Base Q5822

Sent by Scott Benner on September 28, 2000 at 14:46:16: - feedback #1805

Length:
Just right

Comments:
Your first example on looping through a recordset would cause an infinite loop, thus the true "newbies" might not appreciate it locking up their web server.

While Not rs.EOF
Response.Write ...
rs.MoveNext ' <--------
Wend



Sent by Mike Langford on August 30, 2001 at 16:14:31: - feedback #3113

Worth:
Worth reading

Comments:
A better way I have found is to simply do:

if rs.BOF and rs.EOF then
Response.Write("No Records Returned")
else
'Do something with the returned records
end if

Checking for both the EOF and the BOF will ensure that the rs is really empty since you can only be at the end AND the beginning at the same time when there is nothing in the set.



Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.