> Thanks Raymond & Dave... that fixed it... can you help me
> get a better understanding  of this piece of code:
> <cfqueryparam cfsqltype="CF_SQL_NUMERIC" value="#form.exp_years#"
> maxlength="2" null="#YesNoFormat(NOT Len(form.exp_years))#">
>
> As I understand this, its saying the value type to be
> submitted MUST be numeric but I don't totally get what the
> rest does. I know it addresses an empty string but from
> there, I'm lost:
> null ="#YesNoFormat(NOT Len(form.exp_years))#"

The point of the NULL attribute in this example is to allow you to send a
null value if the user provides an empty string. If the user enters anything
into the field, the Len function will return a nonzero value, which by
itself would evaluate to a Boolean value of true. "NOT" true is false, and
the YesNoFormat function converts this Boolean value to the explicit
"yes"|"no" value used by CFQUERYPARAM (although I'm not certain this last
step is necessary).

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to