Wednesday, March 7, 2012

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.

ThanksGood 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|||Thanks for the input. I have since added valididty checks in the code so that no critical errors should occur.

No comments:

Post a Comment