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
Detect SQL Server Instances using reg.exe
Detect SQL Server Instance(s) using reg.exe from the resource kit, just pass the host name! (and make sure reg.exe from the resouce kit is in the ../tools/bin directory. SS2k Only.Enjoy!
2002-04-23
1,045 reads