• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Transact-SQL > Error Handling

Error Handling

During execution of stored procedures, run-time errors might occur (for example, during data insertion) if defined table restrictions or NOT NULL declarations for table fields are violated.

Error handling of SQL Server errors differs from error handling in VBA programs because when errors occur in a stored procedure, the system continues to process the rest of the procedure. In VBA, a run-time error always causes the program to terminate unless you have integrated suitable error handling. If you are familiar with VBA error handling, then you can configure error handling in stored procedures so that every procedure starts with On Error Resume Next and, when an error occurs, the next command will continue execution of the stored procedure.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint