Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    35

    Unanswered: errors in storedprocedures

    Is there a function that will indicate if there is an error in your stored procedure? Like for example, I want to create a stored procedure and if there is an error I want it to print out an error. How can I do this?

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    It' called the query analyzer and there are 2 options the parse button and the execute button.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jan 2004
    Posts
    35
    Thanks, I am aware of the query panel. Are you suggestion that there isn't anything else? I know you can use the SQL server agent or DTS to do some error handling on your job but I wanted to know if there was a function you could add similar to the onerror function in visual basic.

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Check @@error in BOL.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  5. #5
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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