I have a query getting a list of procedures and arguments from a table. Using the results I'm trying to run a series of stored procedures for example this comes back from the query:
sp='sp_gpa' argument='2.5',
sp='sp_sex' argument='m'
and in the page I have the following code:
<cfoutput>
<cfset i=0>
<cfloop query="queryname">
<cfset i=i+1>
<cfstoredproc datasource="gooddatasource" procedure="#sp#">
<cfprocparam type="in" cfsqltype="cf_sql_varchar" value="#argument#">
<cfprocresult resultset="1" name="proc#i#">
</cfstoredproc>
<cfset showresultset="proc"&#i#&".recordcount">
#evaluate(showresultset)#
</cfloop>
</cfoutput>
Admittedly this is a bit convoluted, but from the debug pages it looks like the stored procedures are running, but the recordsets always come back with zero results, but when I run the stored procedures manually I get a resultset.
any ideas?
sp='sp_gpa' argument='2.5',
sp='sp_sex' argument='m'
and in the page I have the following code:
<cfoutput>
<cfset i=0>
<cfloop query="queryname">
<cfset i=i+1>
<cfstoredproc datasource="gooddatasource" procedure="#sp#">
<cfprocparam type="in" cfsqltype="cf_sql_varchar" value="#argument#">
<cfprocresult resultset="1" name="proc#i#">
</cfstoredproc>
<cfset showresultset="proc"&#i#&".recordcount">
#evaluate(showresultset)#
</cfloop>
</cfoutput>
Admittedly this is a bit convoluted, but from the debug pages it looks like the stored procedures are running, but the recordsets always come back with zero results, but when I run the stored procedures manually I get a resultset.
any ideas?