tracker issue : CF-4198194

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

[ANeff] Bug for: invalid cfsqltypes are ignored

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Anit Kumar Panda / Anit Kumar Panda ()

Created: 12/15/2016

Components: Database, CFQuery

Versions: 2016

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2016. / 303807

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Win All

Vote Count: 6

invalid cfsqltypes are ignored
Example: cfsqltype="The quick brown fox jumps over the lazy dog"
But, more realistically (a simple typo gotcha) cfsqltype="cf_sql_intger"
Actual result: No exception
Expected result :An exception stating "cf_sql_intger" is invalid.



I am able to repro this issue on all versions of CF(10/11/2016). I am not sure whether we ignore it deliberately or its a bug.
Comment by Nimit S.
1413 | March 20, 2017 10:18:50 AM GMT
Should error when an invalid type is used. Not that important on a string but does matter with things like CF_SQL_BIGINT etc. Please throw an error.
Vote by John W.
1416 | May 16, 2017 04:03:47 PM GMT
My opinion is that it should error on the wrong type. It also does not error when `string` is used instead of `cf_sql_varchar` in a query of queries. I don't know if that is by design or a bug again, but here is an example:
Comment by Evagoras C.
1414 | May 16, 2017 04:28:01 PM GMT
Should error.
Vote by Evagoras C.
1417 | May 16, 2017 04:28:20 PM GMT
This issue is fixed now. The fix for this issue will be available as part of next major release of ColdFusion. Behavior change: If the CFSQLType attribute's value is not the supported data type, then it will throw an exception with the following message: Invalid attribute value xyz for attribute CFSQLType. However, if the attribute is not specified at all, by default CF uses CF_SQL_CHAR as mentioned in the documentation.
Comment by Nimit S.
1415 | September 12, 2017 02:08:01 PM GMT
Hi Nimit, Thank you very much! I'm just adding the following word into this ticket, to make the ticket easier to find: cfqueryparam Thanks!, -Aaron
Comment by Aaron N.
29895 | November 03, 2018 12:12:27 AM GMT