Title:
Bug 83517:(Watson Migration Closure)in the new cf9 cfscript query cfcyou must have a space after named parameters
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/LowImpact
Reporter/Name(from Bugbase): Mike Causer / Mike Causer (mike causer)
Created: 07/08/2010
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,251028 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Win All
Vote Count: 1
Problem:
in the new cf9 cfscript query cfcyou must have a space after named parameters. tabs, line breaks etc wont work. it must be a space.positional params - "?" - work fine with no trailing space.
Method:
myQry = new query();myQry.setSql('select idfrom tablewhere id = :idand deleted = 0');myQry.addParam( name="id", value=0, cfsqltype='cf_sql_integer' );myQry.execute();If my :id is followed by a line break, it throws an error saying:"Named Sql parameter 'id and' used in the query not found in the queryparams"Replacing the line break with a tab gives the same error.If I inject a space before the line break / tab, it works. It seems the cf9 query cfc params regex is looking specifically for spaces, rather than any whitespace character(s).If I replace the ":id" param with a "?" - ie. use positional params - it works fine with line breaks / tabs and no trailing space.it seems to be isolated to the regex surrounding the named params resolution.
Result:
Named Sql parameter 'id and' used in the query not found in the queryparams
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041750
External Customer Info:
External Company:
External Customer Name: Mike Causer
External Customer Email: 5E3754C04462CDFF992016B6
External Test Config: 07/08/2010
Attachments:
Comments: