I have an optional parameter in my stored procedure.
I call the procedure from my function in cfc file.
The code is following.
Since the Myparam3 is not required in myfunction, neither in stored procedure.
It does not return data if I do not provide 3 parameter from my html link.
It does return the data I need if I provide MyParam3 to MyFunction,
Do I need provide the not requuired optional parameter to my cfc function call for the stored procedure?
Your help and information is great appreciated,
Regards,
Iccsi,
<cffunction name="MyFunction" access="remote" returnformat="json">
<cfargument name ="MyParam1" required="yes">
<cfargument name ="MaParam2" required="yes">
<cfargument name ="MyParam3" required="no">
<cfstoredproc procedure="mySP">
<cfprocparam value = "#MyParam1#" CFSQLTYPE = "cf_sql_date">
<cfprocparam value = "#MyParam2#" CFSQLTYPE = "cf_sql_date">
<cfprocparam value = "#MyParam3#" CFSQLTYPE = "cf_sql_integer">
<cfprocresult name="sp1" resultset="1">
</cfstoredproc>
<cfreturn #serializeJSON(stcReturn, True)#>
</cffunction>
<a href = "Mycfc.cfc?method=MyFunction&Maparam1=01/01/2007&MyParam2=05/05/2013" >My Link</a>