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)
 Capture error messges in a batch or stored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-12-13 : 00:11:37
bill writes "In Batch or SP, using 'SET @save_error=@@ERROR' right after a statement can capture error code. Is there a way to get the SQL raised error string. I.e. an
insert statement caused the following error:

"Violation of PRIMARY KEY constraint 'PK_cJobs'. Cannot insert duplicate key in object 'Jobs'" ?

Thanks,

Bill"
   

- Advertisement -