error when SQL returns NULL value

froggy

Registered User.
Local time
Tomorrow, 06:07
Joined
Sep 15, 2006
Messages
13
Hi,

I have a webpage which shows some results upon executing some SQL statements. However, i will met with some problems when the SQL statements return a NULL value therefore i would like to do some error checking such that when the SQL statement returns NULL, i will direct the user to another page.

Is it possible for me to try sth such as:

if strSQL = SELECT .. FROM .. WHERE .. = NULL then
response redirect ...

Was wondering if anybody would be able to give me some advise.

Thank you.
 
Not sure if you can do it the way you have mentioned but if you run your query and then have something like: "if recordset.count = 0 then..." that should do the job.
 

Users who are viewing this thread

Back
Top Bottom