noulouk
asked on
Error number listing
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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 ?
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 ?
>>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.
No, I do not use custom messages. I rely on my front-end app to handle that.
ASKER
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 ?)
"I rely on my front-end app to handle that." (do you use a RETURN VALUE ?)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can add custom message. Is that what you mean? If so check out sp_addmessage in BOL