Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

isNULL

Status
Not open for further replies.

vlitim

Programmer
Joined
Sep 2, 2000
Messages
393
Location
GB
I am using the below to check to see if a field in the database is empty, but it just defaults to the top response!

Response.Write(cat("description"))

if IsNULL(cat("description")) then
Response.Write("")
else
Response.Write(&quot;<br><br>&quot;)
end if

any help please!??!
 
What is the cat() collection? A recordset? Yours,

Rob.
 
Rob,

yep its a recordset
 
Are you sure that the query is correct? Do you use option explicit to make sure that all variables are correct?

Try using on error goto 0 to trap any possible errors. VBScript has a small bug in it that takes the True part of an IF statement if that IF contained an error:

Code:
on error resume next

IF (1/0) > 0 THEN  'generate division by zero error
   response.Write &quot;True part&quot;
ELSE
   response.Write &quot;Else part&quot;
END IF

The code fragment above will always print 'True part'. Yours,

Rob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top