Results 1 to 3 of 3

Thread: Error Messages

  1. #1
    Join Date
    Jul 2003
    Location
    Grand Rapids, MI
    Posts
    2

    Exclamation Unanswered: Error Messages

    Does anyone know of a way to suppress the error messages while executing a stored procedure in MSSQL. Basically I don't want it yelling at me becuase the primary_key is invalid. I am using the @@ERROR object to do my own error catching and such. But when executing a SP from if it errors out it kills the program calling it, becuase of server error. Any help would be greatly appreciated.

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Good programming practice is to check data validity before trying to insert it into a table. If a critical error occurs it will stop execution for the batch, so if you want to continue processing you need to separate batches (with GO statements) or enclose them in transactions.

    blindman

  3. #3
    Join Date
    Jul 2003
    Location
    Grand Rapids, MI
    Posts
    2
    Thanks for the input. I have since added valididty checks in the code so that no critical errors should occur.

Posting Permissions

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