Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Lance Shepard / Lance Shepard (my2centz)
Created: 01/21/2013
Components: Language, Script CFC
Versions: 9.0
Failure Type: Crash
Found In Build/Fixed In Build: 9.0 /
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Win 2008 Server
Vote Count: 0
Problem Description: In an attempt to get a quoted value I have entered a valid sqlServer query into a query anaylzer which works as expected but if running the same query in cf I get the following error.
SQL QUERY
SELECT '''' +email + '''' as email
FROM users
where fname = @fname
Steps to Reproduce:
var q = new Query(datasource="myDB");
q.setSQL("SELECT '''' +email + '''' as email
FROM users where firstName= :firstName ");
q.addParam(name="firstName", value=trim(firstName), cfsqltype="cf_sql_varchar");
Actual Result:
Email
+email+
+email+
Expected Result:
Email
'bozo@clowns.com'
'bozo2@clowns.com'
Any Workarounds:
Do not try to attempt adding the single quotes in the query. Adding single quotes to the query results works
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3486277
External Customer Info:
External Company:
External Customer Name: my2centz
External Customer Email:
External Test Config: SQL Server 2008 running on Windows 2008
Attachments:
Comments: