Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Dennis Ting / Dennis Ting (Dennis Ting)
Created: 05/29/2015
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: ALL / Windows 7
Vote Count: 0
Problem Description:
When using cfquery to insert rows, one of the things we can obtain is the recordCount, which indicates how many rows were inserted. However, sometimes the recordCount is not accurately obtained. (See attached example.)
Steps to Reproduce:
A sample cfm file is attached that demonstrates the issue. The file requires a SQL Server datasource, so such a datasource must be first set up in CF Administrator.
Once the datasource is set up, update line 7 in the attached cfm file to match the name of the datasource.
The attached cfm file will run a few queries on the datasource; notably, it creates 4 temp tables and then inserts a single row into each of the temp tables.
We then examine the recordCount property to see how many rows were inserted.
Actual Result:
In ColdFusion 11, the output of the attached code is:
Number of rows inserted: ( 1, 1, 1, 0 )
Expected Result:
In ColdFusion 8, the output of the attached code is:
Number of rows inserted: ( 1, 1, 1, 1 )
We believe the ColdFusion 8 output is correct (and the ColdFusion 11 output is incorrect), because there is indeed one row inserted into each of the tables.
We did not test ColdFusion 9 or ColdFusion 10.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3998005
External Customer Info:
External Company:
External Customer Name: Dennis
External Customer Email:
External Test Config: My Hardware and Environment details:
Windows 7
ColdFusion 11 Update 3
The datasource is a SQL Server database (Microsoft SQL Server 2012 - 11.0.5058.0 (X64))
Attachments:
- May 30, 2015 00:00:00: 1_cfqueryRecordCount.cfm
Comments: