Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to pass a recordset from a stored procedure to asp

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-07 : 10:55:57
andrew writes "if you run a select statement in a stored procedure you will get a record set.
How to write the procedure so that I can pass this recordset to a asp file?"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-05-07 : 12:09:45
It's no different from any other ADO recordset. If you have something like this:

rs.Open "SELECT * FROM authors", connObj

Use this to get the results from a stored procedure:

rs.Open "EXECUTE sp_GetAuthors", connObj

You should also look at the ADO Command object, it's more efficient in most circumstances. You can find it in the ADO documentation here:

http://www.microsoft.com/data/download.htm

Download and install the MDAC SDK package and read the ADO help file (ADO260.CHM) You can also check ASP sites, many of them have excellent examples using the Command object:

www.4guysfromrolla.com
www.15seconds.com
www.aspalliance.com
www.asp101.com
www.learnasp.com

Go to Top of Page
   

- Advertisement -