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

Hi;

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

Regards.
LVL 12
jazzIIIloveAsked:
Who is Participating?
 
Brian CroweConnect With a Mentor Database AdministratorCommented:
SELECT * FROM sys.messages
WHERE language_id = 1033
0
 
jazzIIIloveAuthor Commented:
what happened to 1-20 and 22-100?
0
 
jazzIIIloveAuthor Commented:
furthermore, if i have an SQL exception, then will those message appear or a generic message will be coming in C#.NET?

regards.
0
 
Anthony PerkinsConnect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.