Solved

list of sqlexception numbers for mssql to be used in C#.NET

Posted on 2013-11-25
4
1,439 Views
Last Modified: 2013-11-27
Hi;

I need the list of sqlexception numbers for mssql to be used in C#.NET.

Regards.
0
Comment
Question by:jazzIIIlove
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
Brian Crowe earned 250 total points
ID: 39675412
SELECT * FROM sys.messages
WHERE language_id = 1033
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 39676892
what happened to 1-20 and 22-100?
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 39676894
furthermore, if i have an SQL exception, then will those message appear or a generic message will be coming in C#.NET?

regards.
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 250 total points
ID: 39679672
then will those message appear or a generic message will be coming in C#.NET?
It really depends on your coding abilities.  If you do it correctly you would get the same error message as you get in SSMS.  So there is no need for a list of error messages.  They are dynamic and are based on the language.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question