multiple result sets from a stored procedure

multiple result sets from a stored procedure

Post by mutaza » Mon, 17 Sep 2001 02:12:21



hi,

it happens that the result set am interseted in is the last one that my
stored procedure creates. how can the sp set this particulater result set to
be the default RecordSet returned to ADO applications.

-- i dont want to use the NextRecordSet..

regards,
mutaz

 
 
 

multiple result sets from a stored procedure

Post by BP Margoli » Tue, 18 Sep 2001 04:29:29


mutaz,

Stored procedures do not designate result sets to be "default" or not ...
they just return the information requested in the order processed. There is
no mechanism within a stored procedure to designate one of the results set
to be sent back ahead of another one, thereby making that one the "default"
or first result set.

If you don't want the other result sets from the stored procedure, then you
have no alternative to changing the stored procedure to suppress sending
those result sets back to the client.

-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.


Quote:> hi,

> it happens that the result set am interseted in is the last one that my
> stored procedure creates. how can the sp set this particulater result set
to
> be the default RecordSet returned to ADO applications.

> -- i dont want to use the NextRecordSet..

> regards,
> mutaz


 
 
 

multiple result sets from a stored procedure

Post by mutaza » Tue, 18 Sep 2001 15:02:58


thnx


> mutaz,

> Stored procedures do not designate result sets to be "default" or not ...
> they just return the information requested in the order processed. There
is
> no mechanism within a stored procedure to designate one of the results set
> to be sent back ahead of another one, thereby making that one the
"default"
> or first result set.

> If you don't want the other result sets from the stored procedure, then
you
> have no alternative to changing the stored procedure to suppress sending
> those result sets back to the client.

> -------------------------------------------
> BP Margolin
> Please reply only to the newsgroups.
> When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
> can be cut and pasted into Query Analyzer is appreciated.



> > hi,

> > it happens that the result set am interseted in is the last one that my
> > stored procedure creates. how can the sp set this particulater result
set
> to
> > be the default RecordSet returned to ADO applications.

> > -- i dont want to use the NextRecordSet..

> > regards,
> > mutaz

 
 
 

1. return multiple result sets from a stored procedure

Does SQL only pass back once recordset from a stored procedure?

I would like to return multiple recordsets into ADODB and use the
Recordset.NextRecordset method to retrieve them into my application.

The syntax of Recordset.Open() shows multiple SQL statements, but I need the
return of multiple recordsets with the specification of only one SQL
statement(stored procedure).

My original design relied on passing a single parameter of dynamic criteria
and returning 8 recordsets... each one filtered with a temp table created
using the passed criteria.

Thanks.

2. I6.4,Solaris2.3,cachefs

3. How not to return multiple result sets from a stored procedure

4. special character in an identifier

5. Returning Multiple Result Sets for Java Stored Procedures

6. ADO, J++ Sample??

7. Multiple Result Sets from DB2 stored Procedure

8. Did You Know

9. Stored Procedure/Multiple Return Results/Set Statement

10. Parsing Multiple Result Sets from stored procedures

11. Executing Stored procedures with multiple Result sets