Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

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.


©2018 Martin Webb