Copy link to clipboard
Copied
We have existing site in CF6 and it is working fine.We have installed CF9 on same server for testing purpose and using the copy of DB/application files that is used for CF6.What happens is that in CF9 it gives the error
coldfusion.runtime.UndefinedVariableException: Variable Q_DATA_STAT is undefined
in a CFC file that has the variable Q_DATA_STAT which is used inside a function like this
<cffunction name="get_total_status" access="public" returntype="query">
<cfquery maxrows="#arguments.top#" name="q_data_stat" datasource="#application.datasource#">
The query in actual returns 0 records if I check in sqlserver,and I get the above error from where this CFC fcntion is called.The same CFC file and script works in CF6 even though it also has 0 records.Is there a setting in CF9 to handle the resultset that returns 0 records? Or anyone has idea how to handle this error.
Thanks in advance
Harish
Copy link to clipboard
Copied
CF9, or CF9.0.1?
There was a bug in CF9 in that - with some combinations of SQL - a zero-row result set would actually not be returned, instead the variable was set to null.
Here's the ticket for it:
http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=82311
I think it was fixed in 9.0.1. Of course with the CF bug tracker, there's no way to confirm that, other than inferring "closed" means "fixed" (it could mean "not going to fix", or "could not reproduce" - although I know they could reproduce this one - or various other things though).
--
Adam