• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfstoredproc not updating status code

New Here ,
Sep 22, 2016 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

219

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
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation