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)
 Handling Exception Message

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-07-15 : 07:50:40
Kalim writes "Hi,

I am using SQL Server 2000. I want to Handle Exception Message.

What I want is when i executing any user defined stored procedure any error mesagge occured should be trapped and inserted into my created table.

How I can to do that in stored procedure ?
Any Script will be a kind help for me.

Regards
Kalim."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-07-15 : 08:24:08
you can use @@Error
Something like this

--
--
declare @Err int
select @Err= @@error
Select description from master..sysmessages where error=@err


Madhivanan

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

- Advertisement -