Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Posts
    2

    Unanswered: How can I retrieve an SQL-statement which ended in error

    I have defined an exit handler in a stored procedure and now I want to store the SQL-statement in error in a table. How can I retrieve the SQL-statement which ended in error

  2. #2
    Join Date
    Feb 2009
    Posts
    2
    Retrieve SQL-statement which ended in error

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    The easiest way I can think of is before you execute a SQL statement, store it in a variable. Then in the error handler, the contents of that variable will be the offending statement to do with what you want.

    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •