Forum Moderators: open
set rsMyrecordset = conn.execute("spMyStordProc @myparameter")
it returns a recordset that is easy enough to use,
however if the stored procedure produces an error it should RETURN a number
i've written this in the procedure itself, something like:
SELECT foo, bar from tablename where id=@parameter
IF @@error<>0
RETURN 100
....
but how can i get the return value back in the asp page?
>>why not just access the records with your recordset object?
>>in your asp page:
>>You have <%= rsMyrecordset("foo") %>, and <%= rsMyrecordset("bar") %>
yeah absolutely that would be how to get the values of the recordset, however if the stored procedure (which is actually a long series of sql instructions which ultimately returns the recordset) hits an error at any point, that error is returned and the rest of the procedure is not processed and it is not returned as a recordset.