Title:
Bug 83516:(Watson Migration Closure)the cf9 query cfc seems to be missing a true in a listToArray() as the 3rd argument 'includeEmptyFields'
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/LowImpact
Reporter/Name(from Bugbase): Mike Causer / Mike Causer (mike causer)
Created: 07/08/2010
Components: Language, CustomTag
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,251028 /
Priority/Frequency: Major / Unknown
Locale/System: English / Win All
Vote Count: 0
Problem:
the cf9 query cfc seems to be missing a true in a listToArray() as the 3rd argument 'includeEmptyFields'.C:\ColdFusion9\CustomTags\com\adobe\coldfusion\query.cfcin the function private string function replaceDelimsWithMarkers(string sql) on line 345:var sqlArray = listtoarray(arguments.sql,"'");shouldnt it be:var sqlArray = listtoarray(arguments.sql,"'",true);at the moment it is throwing name param ':00' does not exist errors when i try to execute insert queries with blank string followed by dates with '0:00' inside the string.eg. setSql( 'insert into table (col1,col2,col3) select 1, '', '2010-06-01 0:00' );note: i am not using named or positional params in this case.the actual query i am running has 30+ columns, lots of which sometimes blank strings.the function appears to be looping over the sql string breaking up into elements based on single quotes. each 2nd element is then checked for markers. problem is, without listToArray(list,"'",true) every 2nd is not always present. your sqlArray may contain consecutive commas.ive updated this on my local machine and it has been working ever since.could you please verify this and if correct, include it in the next hotfix?
Method:
loc.q = new query( name: 'test', datasource: 'myds' );loc.q.setSql( 'insert into table (col1,col2,col3) select 1, '', '2010-06-01 0:00' );loc.q.execute();C:\ColdFusion9\CustomTags\com\adobe\coldfusion\query.cfcit seems the problem is in the private function replaceDelimsWithMarkers()
Result:
i am getting an error when trying to execute insert queries in the new cf9 query cfc.it is throwing a name param ':00' does not exist when i try to insert into a table when some of the values are blank strings - seems to be a problem with the named/positional param resolution
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041749
External Customer Info:
External Company:
External Customer Name: Mike Causer
External Customer Email: 5E3754C04462CDFF992016B6
External Test Config: 07/08/2010
Attachments:
Comments: