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 |
|
lopes_andre
Starting Member
12 Posts |
Posted - 2009-12-02 : 13:58:04
|
| Hi,I have a procedure that calls other procedures and some procedures produce errors.I need to catch an error with an exception and continue the procedure without aborting.How to do this in SQL Server.PS: Sorry for my bad english.Best Regards,André. |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2009-12-02 : 14:03:02
|
| There is a try-catch construct, as well as RAISERROR that might be helpfulBEGIN TRY { sql_statement | statement_block }END TRYBEGIN CATCH { sql_statement | statement_block }END CATCH[ ; ]JimEveryday I learn something that somebody else already knew |
 |
|
|
lopes_andre
Starting Member
12 Posts |
Posted - 2009-12-02 : 14:35:44
|
| Thanks for the reply. I found that the error only appear when the procedure is called from an external application... I will try to solve the problem on the side of application call.Best Regards. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-03 : 03:42:49
|
| Have you read this?http://www.sommarskog.se/error-handling-I.html#YukonMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|