Checking err.number will tell you whether the preceding code has caused an error. A
query returning no results will not generate an error, whereas a query with invalid
SQL, or calling a non-existant function etc will generate an error.
So if you want to detect whether no results have been returned by your query, check
the EOF property of the record set.
For instance something like this will query your news table and either give the user a
message saying no results were returned, or loop through the returned records :-
set newfindSet = outpostDB.Execute("select * from news.....")
if newfindSet.EOF then
'no records returned
response.write "No records returned"
else
Do While Not newfindSet.EOF
'records returned
...
newfindSet.MoveNext
Loop
end if
Is this the kind of functionality you're looking for, or am I missing the point
somewhere?
Dan
www.diado.com
-----Original Message-----
From: Valter [mailto:[EMAIL PROTECTED]
Sent: 07 September 2004 12:18
To: [EMAIL PROTECTED]
Subject: [AspClassicAnyQuestionIsOk] Re: Another question..
OK...then i am really confused...
where on heart is the code checking the error?
Thank you anyway you are very kind and patient with a dumb like me :-)
Valter
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/