tracker issue : CF-3784311

select a category, or use search below
(searches all categories and all time range)
Title:

Issues with setting query values through array notation because of type validation

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): / ext-user (Himavanth Rachamsetty)

Created: 07/02/2014

Components: Database, CFQuery

Versions: 10.0

Failure Type: Unspecified

Found In Build/Fixed In Build: cf10 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Mac 10 All,Win XP All

Vote Count: 0

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on August 06, 2017 using build 2016.0.01.298513
queryTest = queryNew(
"Name,Amount,DateCreated"
, "varchar,integer,date"
);
data = [
["Bob", 42, "2014-01-01 12:00:00"]
, ["Fred", 32, "2014-02-01 12:00:00"]
, ["Henry", 21, "2014-03-01 12:00:00"]
];
for( rowData in data ){
// add row
row = queryAddRow(queryTest);
querySetCell(queryTest, "Name", rowData[1], row);
querySetCell(queryTest, "Amount", rowData[2], row);
querySetCell(queryTest, "DateCreated", rowData[3], row);
}
 
I then trying changing the values:
 
<!---// problem w/date data typing //--->
<cfset queryTest.DateCreated[1] = "Jun 1, 2014" />
<cfset queryTest.DateCreated[2] = "xxx" />
<!---// problem w/date data typing //--->
<cfset queryTest.Amount[1] = "1,5" />
 
Difference in output with cf9 vs cf10 is shown in the attached jpg file.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3784311

External Customer Info:
External Company:  
External Customer Name:  
External Customer Email:

Attachments:

Comments:

This issue is fixed and the fix for this issue will be part of next ColdFusion major release.
Comment by Nimit S.
11731 | January 07, 2015 12:41:22 AM GMT
Verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Note to whomever reported the issue: "1,5" is correctly no longer converted to a number. Note to whomever reported the issue: Regarding CF11+ trimming time in "date" column type, see comments in CF-3929913. Regarding array notation disrespecting column type for simple values, I've filed CF-4199436. Thanks!, -Aaron
Comment by Aaron N.
11732 | August 06, 2017 11:37:09 PM GMT