tracker issue : CF-3791737

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

Implement stored-proc equivalent of queryExecute()

| View in Tracker

Status/Resolution/Reason: To Fix//

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 07/19/2014

Components: Database

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Platforms All

Vote Count: 9

I touch on this in here, towards the bottom:

Can I recommend you deprecate your generic-CFScript-solution to calling procs in CFScript, along with also deprecated storedproc.cfc. Both are substandard solutions.

This would be more thoughtful, and more in-keeping with CFML in general:

options = {
    datasource        = "scratch_mssql",
    fetchclientinfo    = true,
    returncode        = true
params = [
    {value=URL.low, type="INTEGER"},
    {value=URL.high, type="INTEGER"},
    {type="out", variable="inclusiveCount", type="INTEGER"},
    {type="out", variable="exclusiveCount", type="INTEGER"}

result = executeProcedure("uspGetColours", params, options);

Where result contains properties for metadata, out parameter values and returned recordsets (there's a mock-up in that blog article).


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

Watson Bug ID:	3791737

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:



+1 ......................
Vote by External U.
11587 | November 16, 2014 02:42:36 AM GMT
This feature segregates the parts of the stored procedure in a beautiful way. It is more clear to read and write. Developer would find it useful to have this consistent struck syntax for writing the code for stored procedures as well. +1....this is an improvement worth adding.
Vote by External U.
11588 | February 13, 2015 05:47:24 AM GMT
+1 "Gentlemen, you can't fight in here! This is the War Room" - President Merkin Muffler, Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb
Vote by External U.
11589 | February 13, 2015 02:43:37 PM GMT
This duplicates my request for this with bug CF-3711078, but adds additional details such as a potential implementation.
Comment by External U.
11580 | July 07, 2015 03:15:46 PM GMT
+++++++++++1 Scrap the nonsense that is the generic script versions of tags, but particularly ones as widely used as stored procs.
Vote by External U.
11590 | July 07, 2015 03:17:13 PM GMT
sounds logical to me... "Change is vital, improvement the logical form of change." -James Cash Penney
Vote by External U.
11591 | July 07, 2015 03:18:35 PM GMT
This would be a very useful feature +++++++++++++1
Vote by External U.
11592 | July 08, 2015 08:04:31 AM GMT
Can you please confirm in what version of ColdFusion this is going to be implemented in. It says "to fix" but does not say which version.
Comment by External U.
11581 | January 25, 2016 08:24:14 AM GMT
Vote by External U.
11593 | August 05, 2016 08:16:12 AM GMT
Was this was reconsidered for Aether?
Comment by Carl V.
11582 | August 09, 2017 09:25:11 PM GMT
Can't believe this STILL hasn't been implemented. It's frustrating how Adobe considers things like this which would greatly benefit developers and the readability of the code as "trivial". Is it any wonder we have trouble attracting new developers to the language?? This particularly makes no sense when you want to consider CFML as an enterprise language considering how much more SPs are used in the enterprise than queries.
Comment by Mary J.
11583 | August 09, 2017 10:46:10 PM GMT
queryExecute() & executeProcedure() -or- queryExecute() & procedureExecute() ? Thanks!, -Aaron
Comment by Aaron N.
11584 | August 10, 2017 02:53:02 AM GMT
I'd prefer an even shorter syntax... spExeccute() or sprocExecute() would be fine for me. That said, prcedureExecute() sounds better to me than executeProdecure() since it follows the existing queryExecute() syntax. -- Denny
Comment by Denard S.
11585 | August 10, 2017 03:26:08 AM GMT
queryExecute follows the (ill-considered) Yoda-speak approach to type-focused functions such as queryThis, structThat, listSomething, arraySomethingElse. Where the type comes first, and the action second So there's a precedent there, even though it's a crap one. The "query" in "queryExecute" is not referring to the SQL query, it's referring to the CFML data type "query". This doesn't apply to the execution of stored procs, so there's no need to follow it. And indeed it makes little sense to. What *I'd* prefer these days would be to NOT implement more top-level functions, but instead promote DSNs to be objects not string labels, and have this: myDsn = new SqlServerConnection(host, port, db, user, password, options); // or similar result = myDsn.executeProcedure(name, params, options);
Comment by Adam C.
11586 | August 10, 2017 05:36:30 AM GMT