March 15, 2006

new 'result' attribute in MX7 cfstoredproc

In CFMX7 Macromedia introduced a new (and optional) attribute to the cfstoredproc tag called “result” which specifies a name for the structure in which cfstoredproc returns the statusCode and ExecutionTime variables. If set, this value replaces cfstoredproc as the prefix to use when accessing those variables.

The result attribute provides a way for stored procedures that are called from multiple pages, possibly at the same time, to avoid overwriting the results of one call with another. If you set the result attribute to myResult, for example, you would access ExecutionTime as myResult.ExecutionTime. Otherwise, you would access it as cfstoredproc.ExecutionTime.


  procedure = "foo_proc"  
  dataSource = "myDSN"  
  returnCode = "myResultStats">  

    <cfprocresult name = "RS1" />  

instead of using #cfstoredproc.executionTime# you can use #myResultStats.executionTime#

cfstoredproc Livedocs

© Michael Sharman 2017