Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Error number listing

Posted on 2007-03-26
6
Medium Priority
?
3,264 Views
Last Modified: 2008-01-09
Hi Experts,

I try to catch errors from Sql Server 2005 and find that error number:2627 is "Violation of unique constraint".
Where can I find all other code numbers ?
I need "Violation of unique index" code in particular.
Can I set my  own code without override system codes ?

Thanks in advance for your help.
0
Comment
Question by:noulouk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 1000 total points
ID: 18796708
SELECT * FROM master..sysmessages WHERE description LIKE '%violation%'

>Can I set my  own code without override system codes ?
No
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 18796830
>>Can I set my  own code without override system codes ?<<
You can add custom message.  Is that what you mean?  If so check out sp_addmessage in BOL
0
 
LVL 9

Author Comment

by:noulouk
ID: 18798212
Thanks that helps me very much.
I found 15306 error codes from 21 to 33020.
I mean when I use RAISERROR: can I send the custom error "100001" ?
So, my own errors starts from 100001 to the last int number.

Don't you do like this to catch your error instead of parsing the RAISERROR message string ?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 18800301
>>Don't you do like this to catch your error instead of parsing the RAISERROR message string ?<<
No, I do not use custom messages.  I rely on my front-end app to handle that.
0
 
LVL 9

Author Comment

by:noulouk
ID: 18804543
Sorry, but I don't understand what you mean:
"I rely on my front-end app to handle that." (do you use a RETURN VALUE ?)
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 1000 total points
ID: 18804723
That is one option, although somewhat limited.  An output varchar parameter can return the error message.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

715 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