These work in an insert statement:
<cfqueryparam value="#arguments.KCC_METHOD_CD#" null="#yesNoFormat(NOT len(trim(arguments.KCC_METHOD_CD)))#" cfsqltype="cf_sql_varchar">,
<cfqueryparam value="#arguments.KCC_DEPT_CD#" null="#yesNoFormat(NOT len(trim(arguments.KCC_DEPT_CD)))#" cfsqltype="cf_sql_varchar">,
and these work in an update statement
KCC_METHOD_CD = <cfqueryparam value="#arguments.KCC_METHOD_CD#" null="#yesNoFormat(NOT len(trim(arguments.KCC_METHOD_CD)))#" cfsqltype="cf_sql_varchar">,
KCC_DEPT_CD = <cfqueryparam value="#arguments.KCC_DEPT_CD#" null="#yesNoFormat(NOT len(trim(arguments.KCC_DEPT_CD)))#" cfsqltype="cf_sql_varchar">,
But for dates I had to code this way for my insert:
<cfif len(trim(arguments.KCC_OCCUR_DTE))>
<cfqueryparam value="#createODBCDate(arguments.KCC_OCCUR_DTE)#" cfsqltype="cf_sql_date">,
<cfelse>
NULL,
</cfif>
and this way for my update:
<cfif len(trim(arguments.KCC_OCCUR_DTE))>
KCC_OCCUR_DTE = <cfqueryparam value="#createODBCDate(arguments.KCC_OCCUR_DTE)#" cfsqltype="cf_sql_date">,
<cfelse>
KCC_OCCUR_DTE = NULL,
</cfif>
I was just wondering if anybody knew any details about this apparent bug involving nulls, cfquerryparameter and Oracle.
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
"C code. C code run. Run code run. Please!"
- Cynthia Dunning
Confidentiality Notice: This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

