Groups | Blog | Home
all groups > sql server programming > march 2005 >

sql server programming : @@error can only capture limited error number?


LBT
3/17/2005 11:11:04 PM
Hi experts,

I'm quite confused with the using of @@error in Microsoft SQL 2000. For
instance,

Select * From Table1
If @@error <> 0
print 'Got error!!!'

I can have the @@error to capture the error number 208 (Invalid object name
'Table1') if the specific table is not found inside database.

Vinod Kumar
3/18/2005 12:45:26 PM
Read http://www.sommarskog.se/error-handling-I.html and
http://www.sommarskog.se/error-handling-II.html


--
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

[quoted text, click to view]

AddThis Social Bookmark Button