Yes, the "Parent" stored procedure does return multiple recordsets. I did make sure that I am looping through all recordsets returned, though. Actually after a little research, that was one of the first few things I tried. (Would include code...but there is too much).
Also (maybe I left this out earlier), we ARE dealing with Nested procedures. Procedure A calls Procedures B & C....Procedure B calls Procedures D & E...etc....But for now...we will just stick to A, B & C (all other calls have been commented out)
Also...I found out a little more about what MAY be happening...this may spark some new ideas as well.
The stored procedure calls two other stored procedure...each of the called procedures are supposed to return an error. What I have noticed is as follows:
THE FIRST PROCEDURE TO RAISERROR WINS!...meaning that if procedure A calls procedure B and then procedure C. If Procedure B raises an error and procedure C raises an error....procedure B's error is returned, but it does continue processing, and does call procedure C (as it should), it just doesn't return the error to the ADO Conn.
If procedure B DOES NOT raise an error and procedure C DOES, then procedure C's error is returned.
Furthermore, if I start procedure A off with multiple RaisERROR statements(meaning the errors are raised before the calls to B & C)....and procedures B and C both raise an error....only procedure A's errors are returned.
SO what I have noticed...I guess... is the following:
Only the errors encountered inside of the FIRST PROCEDURE TO ENCOUNTER AN ERROR...get returned. I hope that makes sense to you all.
I can return multiple errors...but only if they are all encountered inside of the same stored procedure....and no errors were raised prior to that, in other procedures.
This leads me to believe that this may be more of a "settings" issue...meaning that i have to "set" something on or off...or include a parameter in the ADO connection object...or something like that. (I have "set nocount on", in all procedures).
Thanks for your help so far I really appreciate it..... and
Thanks in advance,
Matt
P.S. I hope all of that made sense....
Quote:
Originally posted by rnealejr
This sounds like your stored procedure is returning multiple recordsets. If this is the case, then you would have to loop through the recordsets. Can you provide the code for the sp (or if it is too long then just the basic steps and what is returned).
|