Capture error mesgs

  • Hi

    When I raise errors in my SP how can I capture them in a sql table

  • You can record them if they don't abort a transaction or terminate the connection, by changing the sp to capture the value of @@error immediately after each statement in the sp, and insert it into your table if it's <> 0. You can't suppress the errors though - they will be returned to the client as well as being recorded.

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply