Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Common list of SQL exceptions with numbers

Can someone list some of the common SQL exceptions(with Numbers) we will be facing. Need to catch them in my project.

Language: C# MS SQL server

like image 968
AB te pach Avatar asked Jul 22 '14 06:07

AB te pach


Video Answer


1 Answers

SQL Server error messages can be found here:

http://technet.microsoft.com/en-us/library/cc645603(v=sql.105).aspx

Or you can query them with the following query:

SELECT * FROM sys.messages WHERE language_id = 1033

The provider specific exception classes and error codes should be listed in the provider's documentation.

For example ODBC error codes are listed here: http://msdn.microsoft.com/en-us/library/ms714687.aspx

like image 113
Pred Avatar answered Sep 28 '22 03:09

Pred