This will check for the existence and if it is null.
<cfif IIF(IsDefined("tempValue"), "Trim(tempValue)", DE("")) IS "">
It's Null
</cfif>
Or you could use
<cfif IIF(IsDefined("tempValue"), "Trim(tempValue)", DE("")) IS NOT "">
It's Not Null
</cfif>
--K
-----Original Message-----
From: Dempsey, Timothy F. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 08, 2000 6:30 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Null Values check 2
Aslam,
I think what you want is:
<cfif NOT IsDefined("tempValue") ... >
I don't believe there is the equivalent of SQL's NULL in CF.
The above will determine if there is such an entity called tempValue
and if there is, there is stioll a possibility that it could be "" or 0.
-- Tim Dempsey
-----Original Message-----
From: aslam bajaria [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 07, 2000 6:06 PM
To: [EMAIL PROTECTED]
Subject: Null Values check 2
When I used the statement :
<cfif tempValue is NULL>
...
</cfif>
I got the following error. Is there a different way of
checking for NULL?!
Error Occurred While Processing Request
Error Diagnostic Information
Error resolving parameter NULL
ColdFusion was unable to determine the value of the
parameter. This problem is very likely due to the fact
that either:
You have misspelled the parameter name, or
You have not specified a QUERY attribute for a
CFOUTPUT, CFMAIL, or CFTABLE tag.
--- Marcus <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > I am getting an error when I write a code like:
> >
> > <cfif tempValue eq null>
> >
> > ...
> >
> > </cfif>
> >
> > If I write
> >
> > <cfif tempValue eq "">
> > ...
> > </cfif>
>
> Null values can't use EQ or =, you need to ask
>
> <cfif tempValue is NULL>
>
----------------------------------------------------------------------------
--
> Archives:
>
http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
>
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
> or send a message to
> [EMAIL PROTECTED] with 'unsubscribe'
> in the body.
__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.