0 Replies Latest reply on Sep 22, 2016 2:35 PM by randyg139

    cfstoredproc not updating status code

    randyg139

      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]