CF8 -> CF9 Migration : CfProcResult Issue
Hi Guys,
We recently migrated our cf8 application to a new server running cf9 and this piece of code is causing an absolute nightmare! I just don't understand what is happening (Obviously I've modified it a bit to protect sensitive information)
It exists within a cfc as part of the model glue framework (which is bad enough as it is).
I have checked our datasource setup to the old environment, its identical. Nor is there any reserve words...it's almost like the cfprocResult simply isn't setting the value.
The error we are getting is that results is a String and not actually a query.
<cfset var results = "" />
<cfif arguments.status EQ 'status1'>
<cfstoredproc procedure="proc1" datasource="#_getConfig().getDsn()#">
<cfif SESSION.role EQ "type1">
<cfprocparam cfsqltype="cf_sql_integer" variable="var1" value="#SESSION.someVariable#">
<cfelse>
<cfprocparam cfsqltype="cf_sql_integer" variable="var2" value="#arguments.otherVariable#">
</cfif>
<cfprocresult name="results">
</cfstoredproc>
<cfelseif arguments.status EQ 'status2'>
<cfstoredproc procedure="proc2" datasource="#_getConfig().getDsn()#">
<cfif SESSION.role EQ "type1">
<cfprocparam cfsqltype="cf_sql_integer" variable="var1" value="#SESSION.somevariable#">
<cfelse>
<cfprocparam cfsqltype="cf_sql_integer" variable="var2" value="#arguments.otherVariable#">
</cfif>
<cfprocparam cfsqltype="cf_sql_varchar" variable="status" value="#arguments.status#" maxlength="100">
<cfprocresult name="results">
</cfstoredproc>
<cfelse>
<cfstoredproc procedure="proc3" datasource="#_getConfig().getDsn()#">
<cfif SESSION.role EQ "type1">
<cfprocparam cfsqltype="cf_sql_integer" variable="var1" value="#SESSION.someVariable#">
<cfelse>
<cfprocparam cfsqltype="cf_sql_integer" variable="var2" value="#arguments.otherVariable#">
</cfif>
<cfprocparam cfsqltype="cf_sql_varchar" variable="status" value="#arguments.status#" maxlength="100">
<cfprocresult name="results">
</cfstoredproc>
</cfif>
<cfif SESSION.role EQ "type1">
<cfquery name="results" dbtype="query">
SELECT * FROM results WHERE column = '#SESSION.userID#' OR column IS NULL
</cfquery>
</cfif>
Have I missed anything here? I'm not sure why this even happens. (Excuse the legacy code)
