Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server 2005 Error Numbers List

Status
Not open for further replies.

dhlp

Programmer
Dec 11, 2008
1
US
Hello,

I am catching sql exceptions in vb.net and wondering if there is a list somewhere of all sql exception error numbers that I can refer to, to catch and handle specific errors.

I have searched a few places on the web but haven't found a list.

Thanks,

Dave
 
Hello,
list of all errors is here for SQL Server 2005 or 2008:
Code:
select * from sys.messages
and here for SQL Server 2000:
Code:
select * from master.dbo.sysmessages

But you can catch errors in SQL Server 2005 or 2008 in T-SQL. Here is demonstration how TRY/CATCH works:
[URL unfurl="true"]http://www.codeproject.com/KB/database/try_catch.aspx[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top