Status/Resolution/Reason: Closed/Withdrawn/Duplicate
Reporter/Name(from Bugbase): Kevin Morris / Kevin Morris (Kevin Morris)
Created: 06/30/2015
Components: Database
Versions: 11.0
Failure Type: Non Functioning
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win 2008 Enterprise Svr 64-bit
Vote Count: 8
Duplicate ID: CF-3943345
Problem Description:
When using queryExecute() with a SQL statement that includes multiple named parameters, the parser breaks on the second parameter whose name starts with a previous parameter’s name.
Steps to Reproduce:
local.sql = "
INSERT INTO testTable
(url
,urlVariables)
VALUES
(:url
,:urlVariables);
";
local.params = {
"url" = {value="http://www.example.com/test.cfm", cfsqltype="cf_sql_varchar", maxLength="8000"},
"urlVariables" = {value="?some=query&string=from&the=browser", cfsqltype="cf_sql_varchar", maxLength="8000"}
};
queryExecute(local.sql, local.params, {result="local.qryInsert"});
Actual Result:
Error Executing Database Query.
Incorrect syntax near 'Variables'.
Expected Result:
A normal query execution without error.
Any Workarounds:
Reorder the parameters so that the longer names come first. Example:
local.sql = "
INSERT INTO testTable
(urlVariables
,url)
VALUES
(:urlVariables
,:url);
";
local.params = {
"url" = {value="http://www.example.com/test.cfm", cfsqltype="cf_sql_varchar", maxLength="8000"},
"urlVariables" = {value="?some=query&string=from&the=browser", cfsqltype="cf_sql_varchar", maxLength="8000"}
};
queryExecute(local.sql, local.params, {result="local.qryInsert"});
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4014578
External Customer Info:
External Company:
External Customer Name: Kevin
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: