Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Error Handling in SQL Server (like Visual Basic)

By Mohit Nayyar,

Using this technique you can do error handling in SQL Server using the same way you do in Visual Basic (most of it). Just put your SQL Statement in exec('SQL Command') and make use of @@Error to get error information and put your error handling code in If block.

Mohit Nayyar
MCP (.Net), MCSD, MCDBA

Total article views: 888 | Views in the last 30 days: 4
 
Related Articles
FORUM

Error

Error

FORUM

Error

Error

FORUM

error

error

FORUM

Error

Error

FORUM

Installation Error

Error

 
Contribute