tracker issue : CF-3804384

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

queryExecute params not working in mobile

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Dave Ferguson / Dave Ferguson (Dave Ferguson)

Created: 08/12/2014

Components: Mobile Support

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: ALL / Other

Vote Count: 27

Listed in the version Issues Fixed doc
Params only in an array work.  Any params in a struct appear to not work at all.  With the code below in a client cfc only the last query works.  The others return no results or errors.  However, based on the documentation all are valid.

    public function testQueryParams( myId ){
		qry = queryExecute("SELECT * FROM test where id = :id", {id=myId}, {"datasource"="myDB"});		
		qry = queryExecute("SELECT * FROM test where id = :id", {id={value=myId}}, {"datasource"="myDB"});		
		qry = queryExecute("SELECT * FROM test where id = :id", {id:myId}, {"datasource"="myDB"});
		qry = queryExecute("SELECT * FROM test where id = ?", {id=myId}, {"datasource"="myDB"});
		qry = queryExecute("SELECT * FROM test where id = ?", {id='#myId#'}, {"datasource"="myDB"});
		qry = queryExecute("SELECT * FROM test where id = ?", {id='myId'}, {"datasource"="myDB"});
		qry = queryExecute("SELECT * FROM test where id = ?", [edid], {"datasource"="myDB"});

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

Watson Bug ID:	3804384

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



+1 / subscribe -- Adam
Vote by External U.
11371 | August 12, 2014 12:46:30 PM GMT
ColdFusion Mobile Documentation clearly says that - The queryparam attribute value can be provided through position parameters in an array using the queryExecute function. Here is the link of the documentation: please refer to "Support for database queries" in the above wiki. Yes when the syntax is invalid, it should throw an error, i would take this bug forward for error handling. But all the above ways are not supported except positional parameters passed in an array.
Comment by HariKrishna K.
11365 | August 14, 2014 06:55:33 AM GMT
The behavior of queryExecute should be the same across the board. There should be no difference in param syntax for mobile / desktop. This makes the code non-portable between environments. The documentation doesn't state that the other ways are invalid it only stats that that they can be provided via an array.
Comment by External U.
11366 | August 14, 2014 10:02:29 AM GMT
Bloody hell! Only just saw Hari's comment. I completely agree with Dave here. It's fundamentally flawed architecture / language design to have the same function work differently like this simply because it's within <cfclient> tags / client-CFC. It doesn't matter than you've documented that it works that way, it simply should be implemented properly in the first place! -- Adam
Comment by External U.
11367 | August 14, 2014 10:07:03 AM GMT
As much as I think cfclint is a waste, if we are going to implement 'server side' features for use on 'client side' the syntax should match = so the named parameters should work.
Comment by External U.
11368 | August 14, 2014 11:11:43 AM GMT
+1 Make the syntax the same as server side, to do otherwise is foolish.
Vote by External U.
11372 | August 14, 2014 11:12:16 AM GMT
+1 vote. Should be consistent.
Vote by External U.
11373 | August 14, 2014 01:54:39 PM GMT
+1 - This is a no-brainer, stay consistent.
Vote by External U.
11374 | August 20, 2014 12:33:22 PM GMT
If you're going to do something, do it well.
Vote by External U.
11375 | August 20, 2014 01:25:22 PM GMT
If you plan on keeping cfclient, this has to be consistent.
Vote by External U.
11376 | August 20, 2014 01:35:31 PM GMT
If you're going to push this feature, then it must be consistent.
Vote by External U.
11377 | August 20, 2014 01:52:33 PM GMT
Consistency is vital, especially if ColdFusion is to be taken seriously as a viable platform. +1
Vote by External U.
11378 | August 20, 2014 01:52:39 PM GMT
certainly needs to be fixed...
Vote by External U.
11379 | August 20, 2014 01:57:54 PM GMT
Keep it consistent please
Vote by External U.
11380 | August 20, 2014 02:02:17 PM GMT
Please fix this........................................................
Vote by External U.
11381 | August 20, 2014 02:08:18 PM GMT
pew pew pew fix pew pew pew
Vote by External U.
11382 | August 20, 2014 04:41:52 PM GMT
it should work as per docs
Vote by External U.
11383 | August 20, 2014 05:29:00 PM GMT
pls fix it and patch cf11
Vote by External U.
11384 | August 20, 2014 06:21:31 PM GMT
Vote. +1. Fix it. Ditto what everyone else says. (am I at 25 chars yet?)
Vote by External U.
11385 | August 20, 2014 08:51:39 PM GMT
Since the whole point of CFCLIENT is supposed to be "CFML on the client", having a CFML function behave so differently between server side and client side is ... I'm trying to find a polite way to say this ... lame, stupid, half-assed. Sorry, but this is a completely arbitrary difference that just says you couldn't be bothered to do things properly (again).
Vote by External U.
11386 | August 20, 2014 11:11:56 PM GMT
+1 for consistency and not looking flaky
Vote by External U.
11387 | August 21, 2014 04:30:17 AM GMT
Please fix. I do not currently use cfclient, but I intend to give it a shot at some point in the near future.
Vote by External U.
11388 | August 21, 2014 06:29:45 AM GMT
Fix this for consistency and to match documentation.
Vote by External U.
11389 | August 21, 2014 07:44:02 AM GMT
Cfclient should never have been created in the first place and I will personally never use it. However that being said, its in the product now so it should at least work consistently with the rest of language. Adobe show some pride in your work and fix this.
Vote by External U.
11390 | August 21, 2014 09:11:39 AM GMT
Please fix to address making CFclient complete
Vote by External U.
11391 | August 21, 2014 10:07:50 AM GMT
No need to reiterate what others have said. This is an impact to code reuse and portability and should be modified to be consistent across the board.
Vote by External U.
11392 | August 21, 2014 10:25:28 AM GMT
Please stay consistent with these implementations.
Vote by External U.
11393 | August 21, 2014 11:38:49 AM GMT
Nothing worse in a language than inconsistencies like this. Adobe needs to stop making excuses for such bugs and just FIX them.
Vote by External U.
11394 | August 21, 2014 11:54:01 AM GMT
Ditto to everyone else's comments below
Vote by External U.
11395 | August 21, 2014 02:32:15 PM GMT
Adam Cameron sent me I'm in charlston sc for a hackathon this weekend
Vote by External U.
11396 | August 21, 2014 10:46:37 PM GMT
Following cases of named params will be supported along with the positional params - 1) Named params basic - queryExecute("SELECT * FROM test where id = :id and text = :text ", {"text"="hello","id"=1} 2) Named params with variable value - queryExecute("SELECT * FROM test where id = :id and text = :text ", {"text"="hello","id"=myId} 3) Named params with value specified with struct syntax - queryExecute("SELECT * FROM test where id = :id", {id={value=1}}, {"datasource"="myDB"}); (Comment added from ex-user id:sandeepp)
Comment by Adobe D.
11369 | September 04, 2014 03:52:50 AM GMT
Thanks folks for raising it as a bug.
Comment by HariKrishna K.
11370 | September 04, 2014 11:33:06 PM GMT
should be consistent or not implemented at all.
Vote by External U.
11397 | September 14, 2014 11:57:05 AM GMT