?
Solved

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

Posted on 2013-11-25
4
Medium Priority
?
1,726 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 1000 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 1000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

840 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