rhyswilliams
Programmer
I want to pass a (non-oracle) coldfusion query 'recordset' to an oracle stored procedure using a CF_SQL_REFCURSOR.
this is my code:
<cfquery datasource="NATIVE" NAME=NATIVEQUERY>
SELECT *
FROM NATIVETABLE
</cfquery>
<CFSET NEWVAL=99>
<cfstoredproc procedure="UPDATENATIVES.UPDATENATIVE" datasource="NATIVE" DBTYPE="ORACLE80">
<cfprocparam type="In" cfsqltype="CF_SQL_NUMERIC" variable="NEWVAL" value="#NEWVAL#">
<cfprocparam type="InOut" cfsqltype="CF_SQL_REFCURSOR" variable="UPDATE_RESULTS" maxrows="-1" VALUE=NATIVEQUERY>
<cfprocresult name="NATIVE_RESULTSSET">
</cfstoredproc>
<cfoutput QUERY="NATIVE_RESULTSSET">
RESULTS:#NUMBERFLD#
</cfoutput>
when i run the page, i get the following error.
can anyone shed any light on the error? (is it even possible to do what i'm trying?)
unknown exception condition
PCodeRuntimeContextImp::executeSQLTagCFStoredProc::endTag
The error occurred while processing an element with a general identifier of (CFSTOREDPROC), occupying document position (9:1) to (9:91) in the template file d:\users\native\RECORDSETTEST.CFM.
this is my code:
<cfquery datasource="NATIVE" NAME=NATIVEQUERY>
SELECT *
FROM NATIVETABLE
</cfquery>
<CFSET NEWVAL=99>
<cfstoredproc procedure="UPDATENATIVES.UPDATENATIVE" datasource="NATIVE" DBTYPE="ORACLE80">
<cfprocparam type="In" cfsqltype="CF_SQL_NUMERIC" variable="NEWVAL" value="#NEWVAL#">
<cfprocparam type="InOut" cfsqltype="CF_SQL_REFCURSOR" variable="UPDATE_RESULTS" maxrows="-1" VALUE=NATIVEQUERY>
<cfprocresult name="NATIVE_RESULTSSET">
</cfstoredproc>
<cfoutput QUERY="NATIVE_RESULTSSET">
RESULTS:#NUMBERFLD#
</cfoutput>
when i run the page, i get the following error.
can anyone shed any light on the error? (is it even possible to do what i'm trying?)
unknown exception condition
PCodeRuntimeContextImp::executeSQLTagCFStoredProc::endTag
The error occurred while processing an element with a general identifier of (CFSTOREDPROC), occupying document position (9:1) to (9:91) in the template file d:\users\native\RECORDSETTEST.CFM.