Highlighted

cfstoredproc not updating status code

New Here ,
Sep 22, 2016

Copy link to clipboard

Copied

When using the cfstoredproc tag I am not seeing the status code being set when the returncode attribute is set to 'Y'. Below is the code that calls the stored procedure. I am running on ColdFusion 2016 developer addition and my database is DB2 10.5.

<cfstoredproc procedure="NULLID.APP_PE_USRCHK" datasource="#MM_connCFWorking_DSN#" username="#MM_connCFWorking_USERNAME#" password="#MM_connCFWorking_PASSWORD#" debug="yes" returncode="yes">
<cfprocparam type="IN" value="#attributes.USERID#" cfsqltype="CF_SQL_VARCHAR">
<cfprocparam type="INOUT" value="#app_pe_userchk__ISAUTHORIZED#" variable="app_pe_userchk__ISAUTHORIZED" cfsqltype="CF_SQL_CHAR">
</cfstoredproc>

<cfdump var="#cfstoredproc#" >

<cfset caller.app_pe_userchk__isauthorized = #trim(app_pe_userchk__ISAUTHORIZED)#>

<cfoutput>
cfstoredproc.statuscode: #cfstoredproc.statuscode#<br>
app_pe_userchk__ISAUTHORIZED: #app_pe_userchk__ISAUTHORIZED#<br>
</cfoutput>
<cfif CFSTOREDPROC.STATUSCODE neq 0>
<cfthrow message="No app_pe_userchk performed">
</cfif>

The output from the cfdump of the cfstoredproc is below.

struct
ExecutionTime
StatusCode[empty string]

Views

154

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

cfstoredproc not updating status code

New Here ,
Sep 22, 2016

Copy link to clipboard

Copied

When using the cfstoredproc tag I am not seeing the status code being set when the returncode attribute is set to 'Y'. Below is the code that calls the stored procedure. I am running on ColdFusion 2016 developer addition and my database is DB2 10.5.

<cfstoredproc procedure="NULLID.APP_PE_USRCHK" datasource="#MM_connCFWorking_DSN#" username="#MM_connCFWorking_USERNAME#" password="#MM_connCFWorking_PASSWORD#" debug="yes" returncode="yes">
<cfprocparam type="IN" value="#attributes.USERID#" cfsqltype="CF_SQL_VARCHAR">
<cfprocparam type="INOUT" value="#app_pe_userchk__ISAUTHORIZED#" variable="app_pe_userchk__ISAUTHORIZED" cfsqltype="CF_SQL_CHAR">
</cfstoredproc>

<cfdump var="#cfstoredproc#" >

<cfset caller.app_pe_userchk__isauthorized = #trim(app_pe_userchk__ISAUTHORIZED)#>

<cfoutput>
cfstoredproc.statuscode: #cfstoredproc.statuscode#<br>
app_pe_userchk__ISAUTHORIZED: #app_pe_userchk__ISAUTHORIZED#<br>
</cfoutput>
<cfif CFSTOREDPROC.STATUSCODE neq 0>
<cfthrow message="No app_pe_userchk performed">
</cfif>

The output from the cfdump of the cfstoredproc is below.

struct
ExecutionTime
StatusCode[empty string]

Views

155

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 22, 2016 0

Have something to add?

Join the conversation