Link to home
Start Free TrialLog in
Avatar of MichaelJC
MichaelJC

asked on

Convert Raiserror to resultset

I have sps created by a third party. They return business rules by using raiserror, giving me back a number and description for each error. I can read these in VB fine. How can I capture these in a sp that calls the third party sp and returns the business rules as a resultset?  Basically, I need to know how to cycle through the errors generated by the raiserror statement in Sybase and put them into a temp table.
Avatar of ajith_29
ajith_29

Hi Micheal,
Raiserror errors are generated using sysmessages table where there is column for error,description etc.,Syase system errors are stored to a range and the remaining range you can use for custom built raiserror.So put the sysmessages table to the temp table after the sybase's rang you will get the raiserrors for you.
Bye
Avatar of MichaelJC

ASKER

The sysmessages table returns EVERY error put in there, not just the ones that have been raised. Also, the errors that are being raised are not necessarily in the sysmessages table.  Here is an example of what I want to do:

raiserror 60000 'First error'
...
raiserror 70000 'Second error'
...
<select all raised errors>




ASKER CERTIFIED SOLUTION
Avatar of ajith_29
ajith_29

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial