Status/Resolution/Reason: Closed/Won't Fix/Workaround
Reporter/Name(from Bugbase): Steve Sommers / Steve Sommers (Steve Sommers)
Created: 07/18/2016
Components: Language
Versions: 11.0
Failure Type: Non Functioning
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: ALL / Windows 7 SP1 64-bit
Vote Count: 0
Problem Description: I'm fairly certain I found a scope bug. I'm using CF11 and FW/1 and I have the following query -- the tag works, the cfscript equivalent triggers a "Table named rc.qSignerLinks was not found in memory" exception.
Steps to Reproduce:
/* works*/
<cfquery name="local.qResultSet" result="local.qResult" dbtype="query">
SELECT
*
FROM
rc.qRSRecipient
where
[email] = <cfqueryparam value="#session.user.getEmail()#" cfsqltype="CF_SQL_VARCHAR" maxlength="50" />
</cfquery>
/* exception */
<cfscript>
local.qObj = new query();
local.qObj.setDBType("query");
local.qObj.setSQL("
SELECT
*
FROM
rc.qRSRecipient
where
[email] = :email
");
local.qObj.addParam( name="email",value="#session.user.getEmail()#",cfsqltype="CF_SQL_VARCHAR",maxlength="50" );
local.qObjResult = local.qObj.execute();
local.qResultSet= local.qObjResult.getResult().recordCount NEQ 0;
</cfscript>
Actual Result: Exception
Expected Result: Both methods should have worked identically.
Any Workarounds: I recoded using the tag format. In the referenced thread below there was a suggestion to use SetAttributes. I have not confirmed this option works but it seems promising.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4173251
External Customer Info:
External Company:
External Customer Name: Steve Sommers
External Customer Email:
External Test Config: Windows 7 Ultimate 64-bit, IIS, CF11 11,0,07,296330 developers edition, Update Level chf11000007.jar, Java Version 1.7.0_55
Attachments:
Comments: