Skip to main content
Inspiring
October 28, 2008
Answered

Returns more than one resultset. How?

  • October 28, 2008
  • 1 reply
  • 707 views
I have a Stored Proc that returns 4 resultsets, how will I invoke them from a cfm page to get each resultset?
Below is my proc. The Proc is in a CFC
This topic has been closed for replies.
Correct answer Newsgroup_User
umuayo wrote:
> Hi,
>
> The Proc is in a CFC. I need to invoke the cfc from the cfm page to return cfstoredproc query results.

Then just do that.

Of course you can only return one value from a function so you will need
to put those four results into an array or structure or something to
group them together.

Then use the complex variable of your choice in the cfm page.

1 reply

Inspiring
October 28, 2008
> how will I invoke them from a cfm page to get each resultset

What do you mean invoke? The code above should create four query objects: results1, result2, results3, results4. You can use them as you would any other query object (output, loop through them, etc..)

<cfoutput query="results1">
....
</cfoutput>
<cfoutput query="results2">
....
</cfoutput>
...
umuayoAuthor
Inspiring
October 29, 2008
Hi,

The Proc is in a CFC. I need to invoke the cfc from the cfm page to return cfstoredproc query results.