The Problem: Does SQL Server have anything like VB’s On Error GoTo?

Tip (SQL Server): Error Handling in a Stored Procedure

Tips and Tricks for: SQL Server
The Problem: Does SQL Server have anything like VB’s On Error GoTo?

To those familiar with Visual Basic, VB provides the option to use the ON ERROR GOTO … clause to catch practically any error and handle it in one’s program.

Does SQL Server 2000 have the analogous clause that will jump to a certain part of code in a stored procedure to handle errors?
Solution: Errors must be checked after every SQL statement of interest.

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

What is 2 + 8 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)