Help! Stored procedure which returns result set.

Help! Stored procedure which returns result set.

Post by Greg Friedma » Wed, 03 Mar 1999 04:00:00



I have a stored procedure which is trying to determine the database which
has been associated with a particular ODBC DSN.

The sp_dsninfo system stored procedure returns a result set of different
information about a datasource including the database name.

I can't figure out how to use this information in my stored procedure
though? How can I programmatically cursor through the result set returned by
sp_dsninfo?

I really appreciate any help you can provide.

Thanks,
Greg Friedman
Senior Consultant
Edgewater Technology, Inc

 
 
 

1. returning result sets from stored procedures

The books I have don't describe very well how to return a result set
from a stored procedure.  They show that all you have to do is put a
SELECT statement into your procedure.  However, how do you handle the
following cases:

1.  You have a select statement in your stored proc that you DO NOT
want to return, because you are just selecting data to be used as
local variables.  Does SQL Server ignore all selects of the format
with equals signs in them like ...

What if you have a mixture of fields like

Will mycol1 be returned to the client while mycol2 is not?

2.  Does every select send metadata?  What if you want to send a
single result set from multiple select statements?  How do you get rid
of the metadata in between rows?

2. Something rare!

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

4. Simple question:get an input

5. return multiple result sets from a stored procedure

6. Removing trailing zeros (clarifaction)

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. How not to return multiple result sets from a stored procedure