Make sure you use SET NOCOUNT ON at the beginning of your proc, and SET
NOCOUNT OFF just before your final SELECT (which contains the results you
are after in the ASP code).
Otherwise, figure out how many resultsets are being returned to ASP, and
set rs = rs.nextrecordset()
until you get to the one you need. I'll leave it as an exercise to the
reader to determine which is more efficient. :-)
For more info on executing SPs from ASP, see
I've written a stored procedure which generates a random recordset
using a cursor to populate a temp table). In ASP, it appears that the final
select statement of the procedure is not returned to the recordset object...
Rs = Cmd.Execute()
How do you ensure that the final SELECT statement of a complex stored
will be returned to the recordset object in ASP?