Status/Resolution/Reason: To Fix//
Reporter/Name(from Bugbase): Chris Phillips / Chris Phillips (cf_chris)
Created: 04/22/2014
Components: Database
Versions: 10.0
Failure Type: Usability Issue
Found In Build/Fixed In Build: Final /
Priority/Frequency: Minor / Some users will encounter
Locale/System: English / Win All
Vote Count: 1
Problem Description:
Being able to chain methods allows for a nice terse, elegent syntax. But, addParam has a returntype of void. So, you have to call each addParam() on the original Query object.
Steps to Reproduce:
var vehicleQry = new Query(
datasource="DealerPeak",
sql="SELECT TOP(1) [Year], Car_Make, Car_Model FROM Vehicle WHERE Active = :Active AND Car_StatusID = :Car_StatusID ORDER BY CarIdentity DESC"
)
.addParam( name="Active", value="1", cfsqltype="cf_sql_integer" )
.addParam( name="Car_StatusID", value="1", cfsqltype="cf_sql_integer" )
.execute().getResult();
Actual Result:
Exception: The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Expected Result:
Run the query successfully.
Any Workarounds:
Type more characters than you need to.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3747685
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:
- April 23, 2014 00:00:00: 1_AddParamNotChainable.cfm
Comments: