Stored Procedure - Error Handling


When an error is encountered within a stored procedure, the best you can do (assuming its a non-fatal error) is halt the sequential processing of the code and either branch to another code segment in the procedure or return processing to the calling application. Notice that the previous sentence is specific to non-fatal errors. There are two type of errors in SQL Server: fatal and non-fatal. Fatal errors cause a procedure to abort processing and terminate the connection with the client application. Non-fatal errors do not abort processing a procedure or affect the connection with the client application. When a non-fatal error occurs within a procedure, processing continues on the line of code that follows the one that caused the error. Article by Garth Wells, more

Comments

Popular posts from this blog

SQL 2008

SQL Buddy

Microsoft a BI Force