Jeremy Stein - Brain
« Web Hosting Information | ASP.NET order of page load » |
Sql Server stored procedure throw error for .NET
When generating an error from a TSQL stored procedure to be caught by ADO.NET, you must generate an error level of 11-18. Error levels below that are ignored.
Example code:
raiserror('Bad value for x of %d', 16, 1, @x) with seterror
return @@error
I recommend error level 16 based on this article on error handling.
No Comments
Be the first to comment!
« Web Hosting Information | ASP.NET order of page load » |
Leave a Reply