return multiple result sets from a stored procedure 
Author Message
 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.



Tue, 10 Dec 2002 03:00:00 GMT
 return multiple result sets from a stored procedure

Mark,

Any application is going to see stored procedure as just another table,
though if your recordsets will have the same number of columns with the same
attributes
you can append them to the same temporary table and do final select from
this table.

Alex Glauberzon  /MCSE,MCT,MCDBA/


Quote:
> 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.



Sat, 14 Dec 2002 03:00:00 GMT
 return multiple result sets from a stored procedure
Mark,

I just tried and yes you may put multiple select statements into the same
stored procedure and this stored procedure will return multiple result sets.

Alex Glauberzon /MCSE,MCT,MCDBA/


Quote:
> 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.



Sat, 14 Dec 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

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

2. Returning Multiple Result Sets for Java Stored Procedures

3. Stored Procedure/Multiple Return Results/Set Statement

4. multiple result sets returned from a stored prodedure

5. returning result sets from stored procedures

6. Returning result sets in oracle stored procedure (OLEDB)

7. Can't update result set returned from stored procedure using RDO

8. Returning result set from function to stored procedure is very slooooooooow

9. best way to return a paged result set from a stored procedure

10. Returning a result set from a Stored Procedure

11. returning result sets from stored procedures

12. return result set from stored procedure


 
Powered by phpBB® Forum Software