Solved

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

Posted on 2013-11-25
4
1,376 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
Comment Utility
SELECT * FROM sys.messages
WHERE language_id = 1033
0
 
LVL 12

Author Comment

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

Author Comment

by:jazzIIIlove
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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 backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now