Title:
Bug 86416:When trying to use the duplicate() function against a recordset returned from a <cfstoredproc> tag containing multiple recordsets
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Todd Kingham / Todd Kingham (QueryDawg)
Created: 02/18/2011
Components: General Server
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Mac 10 All
Vote Count: 3
Duplicate ID: CF-3041552
Problem:
When trying to use the duplicate() function against a recordset returned from a <cfstoredproc> tag containing multiple recordsets.... the duplicate() function returns an empty query object. If you only return 1 recordset from the storedproc it's fine. As soon as you reutrn multiple recordsets.One workaround I found was to serialize/deserialize the query first... but this adds unessasary overhead....
Method:
//THIS WORKS<cfstoredproc procedure="MyStoredProcedure" datasource="myDatasource"><cfprocresult resultset="1" name="q1"></cfstoredproc><cfdump var="#q1#" label="This dump will contain records"><cfdump var="#duplicate(q1)#" label="This will contain records also because only one resultset was returned">//THIS ERRORS :<cfstoredproc procedure="MyStoredProcedure" datasource="myDatasource"><cfprocresult resultset="1" name="q1"><cfprocresult resultset="2" name="q2"><cfprocresult resultset="3" name="q3"></cfstoredproc><cfdump var="#q1#" label="This dump will contain records"><cfdump var="#duplicate(q1)#" label="This dump will be empty because multiple resultsets">//WORKAROUND:<cfstoredproc procedure="MyStoredProcedure" datasource="myDatasource"><cfprocresult resultset="1" name="q1"><cfprocresult resultset="2" name="q2"><cfprocresult resultset="3" name="q3"></cfstoredproc><cfdump var="#q1#" label="This dump will contain records"><cfdump var="#duplicate(deserializeJSON(serializeJSON(q,false),false))#" label="this works after serialize/deserialize">
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3043405
External Customer Info:
External Company:
External Customer Name: Todd Kingham
External Customer Email: 0C08612144C8EEA599201549
External Test Config: 02/18/2011
Attachments:
Comments: