- Daryl Foster
- SnapObjects
- Monday, 26 October 2020 06:29 AM UTC
Hi, I'm using the SnapObjects SelectProcedure function in a web api and I want to know how to catch an error that occurs in the stored procedure (from a RAISERROR command in the stored procedure.) The SelectProcedure works ok and fills my model with data when I call it and it works normally, but when the stored procedure raises an error the model is null. I guess I can tell that the stored proc has failed if the model is null, but I want to get the details from the RAISERROR in the stored procedure similar to how I would with sqldbcode and sqlerrtext in Powerbuilder.
Are there any properties or methods on the DataContext that can give me sqldbcode and sqlerrtext equivalents?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.