Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-04-06 : 20:07:41
|
| SHEKHAR writes "In the stored procedure, the SQL query is inserting records to the linked MS SQL database. Though the immidiate line after the insert statement is IF @@ERROR<>0, still the stored producdure is gets terminated and does not execute the statement inside the IF block. Any solutions?" |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2006-04-06 : 20:52:08
|
| An error is occuring during your insert which as a severity level high enough to stop execution of your code. You did not post the error but chances are it is a constraint violation. Most of these errors can be caught by anticipating what error could occur, test for the error condition and only attempt the insert if your test is successfull. Feel free to post your SP along with the error that is returned and someone here can help you with a specific solution.Be One with the OptimizerTG |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|