Status/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Micky Dionisio / Micky Dionisio (micky.dionisio)
Created: 11/24/2009
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Minor / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Duplicate ID: CF-3040208
Problem:
CF9 does not allow for sql parameter REUSE. For instance, if I have a SQL statement that uses a "first_name" parameter twice, when it gets to the second reference of "first_name", it will error out. The work around is two duplicate my parameters and append a numeric value to the end of it which unecessarily increases code complexity and duplication.
Method:
var query = new Query();
query.addParam(name = "name", value = "bleh", cfsqltype = "cf_sql_varchar", maxlength = "50");
query.setSQL("select name from table1 where upper(name) = :name and lower(name) = :name"); //you get the idea. :name is used twice in the SQLquery.execute(); //dump this
Result:
Named Sql parameter 'some_name' used in the query not found in the queryparams
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040447
External Customer Info:
External Company:
External Customer Name: Micky Dionisio
External Customer Email: 59E23BAD476987309920154A
External Test Config: 11/24/2009
Attachments:
Comments: