How about logging the error to a table ?
If you are on 2005+ you could use TRY and CATCH blocks.
For example:
<pre>
BEGIN TRY
— Your code
END TRY
BEGIN CATCH
insert dbo.Application_Error_Log (UserName, tableName,
errorNumber, errorSeverity, errorState, errorMessage)
values (suser_sname(), @tableName, ERROR_NUMBER(),
ERROR_SEVERITY(), ERROR_STATE(), ERROR_MESSAGE())
END CATCH;</pre>
Discuss This Question: 8  Replies