FYI: John's solution doesn't work with older (v#?) CF.  It counts on the
expression evaluation short circuiting -- in other words if
"form.refpresdate" is not defined, it doesn't attempt to evaluate the rest
of the expression.
Older versions will STILL attempt to evaluate 'form.refpresdate is not ""'
and will throw an error.

Question:  Which version of CF first did short-circuit processing?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 11, 2001 8:05 AM
To: CF-Talk
Subject: RE: Access question


This is what I use:

<CFIF isDefined("form.RefPresDate") AND form.RefPresDate IS NOT
"">#CreateODBCDate(form.RefPresDate)#<CFELSE>Null</CFIF>,


On Thu, 11 January 2001, "Sean Daniels" wrote:

> 
> > If a field in access has never had anything in it at all does it appear
as
> > NULL or as "".
> 
> It appears as null.
> 
> > So would you check it with <CFIF FieldName IS ""> or would you use <CFIF
> > FieldName IS NULL>
> 
> Well, ColdFusion does not support the word "NULL", so you would use the
> <cfif FieldName is "">. Or, many people prefer: <cfif not
> len(trim(fieldname))>
> 
> The latter is boolean and therefore evaluates slightly faster.
> 
> - Sean
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to