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 - 2001-02-18 : 22:13:26
|
Mala writes "Hi,
I have problem handling error in Stored Procedure. I have about 7 tables in my transactions, where I will be updating/inserting/picking values from these tables, all inter related. If it fails at any point it should not proceed and transaction should rollback.
I have used Begin Transaction and End Transaction.I have read your article on "HANDLING ERRORS IN SP", but it is not of much help. As you have specified, if it is non-fatal error, it displays error message [i.e. if @@Error <> 0 ] then proceeds with next statement [In my procedure I am sure most of it will be non-fatal errors]. But In this case I have to stop and branch it to error handling where I rollback my entire transactions. I tried Error handling using "GOTO" statement but in vain.
Please help me how do I handle this situation.
Bye,
Mala" |
|
|
|
|
|