Read Error Message
I would like be able to have a stored procedure save an error message, but I have not been able to determine a way to return the sysmessages text (with the appropriate placeholders defined) in the stored procedure.
Example:
select ... something that causes an error
set @error = @@error
insert into ...... save to my table
select description from sysmessages
The problem with this is the placeholders are not populated, but this is the information I would like to have. Any suggestions?
|