Title:
Having one single quote in a multi-line style comment in a script based query breaks params.
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Chris Phillips / Chris Phillips (cf_chris)
Created: 06/02/2014
Components: Database
Versions: 10.0
Failure Type: Crash
Found In Build/Fixed In Build: Final /
Priority/Frequency: Normal / Some users will encounter
Locale/System: English / Win All
Vote Count: 0
DESCRIPTION:
Problem Description:
If you write "multi-line" style comment in the sql of a script based query that includes a single single-quote, it will break the parameters that follow it.
Steps to Reproduce:
Write a query in the style of "var q = new Query(...)".
Include a multiline comment in the SQL like "/* Don't include inactive things */" before one of the "colon-params" (e.g. tbl.Active = :Active).
Run it.
See error.
Actual Result:
[Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near ':'
Expected Result:
The query runs and returns a recordset. This is the actual result for <cfquery>. It is broken for Query.cfc.
Any Workarounds:
Avoid informative comments in your code if you choose to write script components.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3769705
External Customer Info:
External Company:
External Customer Name: cf_chris
External Customer Email:
External Test Config: My Hardware and Environment details:
Windows 7 (SP1) 64-bit
ColdFusion 10 - 10,0,12,286680
Java Version - 1.7.0_17
Attachments:
- June 03, 2014 00:00:00: 1_QueryObjectFail.cfm
Comments: