macromedia.coldfusion.advanced_techniques
[Top] [All Lists]

Re: Stored Procedure to Add Record not adding record

Subject: Re: Stored Procedure to Add Record not adding record
From: "JR "Bob" Dobbs"
Date: Wed, 15 Oct 2008 15:20:32 +0000 UTC
Newsgroups: macromedia.coldfusion.advanced_techniques

Replace:

    <cfif isdefined ("Form.Amt_Principle") and Form.Amt_Principle NEQ "">
                <cfprocparam cfsqltype="cf_sql_decimal" 
value="#Form.Amt_Principle#">
        <cfelse>Null</cfif>


 With:

 I'd provide each form variable with a default value so that a value will 
always exist for each variable.
 <cfparam name="form.Amt_Principle" default="" />

 Use the null attribute, if the value is 'yes' the value NULL will be passed to 
the stored procedure parameter, else the contents of the value attribute will 
be used
 <cfprocparam cfsqltype="cf_sql_decimal" value="#Form.Amt_Principle#" 
null="#YesNoFormat(not(IsNumeric(form.Amt_Principle))#">


 
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_14.ht
ml#1102102


<Prev in Thread] Current Thread [Next in Thread>