Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Retrieving the text of a error message in SQL 2000

Author  Topic 

Jim77
Constraint Violating Yak Guru

440 Posts

Posted - 2006-11-01 : 05:18:55
Hi guys
I have captured a error number in one of my procedures but want to convert this to the respective error message in the sysmessages table, is this at all possible having db_owner priviledges ?


(Apologies I know this question has probably come up many times !)

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-01 : 05:22:25
Why not raise a custom message with RAISERROR?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-01 : 05:23:19
Oh, you mean you use QA as front-end tool?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Jim77
Constraint Violating Yak Guru

440 Posts

Posted - 2006-11-01 : 05:30:40
yeah Peter I am using no client library just QA, I could use the Raiserror with a custom message but want to capture the system defined error message in one of my user error tables.

No train smash I will just get the number for now, thanks.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-01 : 09:22:35

http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html

For system defined messages look in sysmessages table with error code

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -