17.07.2015 Views

Defensive Database Programming - Red Gate Software

Defensive Database Programming - Red Gate Software

Defensive Database Programming - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using Transactions for Data Modifications......................................................................257Using Transactions and XACT_ABORT to Handle Errors............................................ 262Using TRY…CATCH blocks to Handle Errors................................................................. 266A TRY…CATCH example: retrying after deadlocks.................................................... 267TRY…CATCH Gotchas.........................................................................................................273Re-throwing errors.............................................................................................................273TRY…CATCH blocks cannot catch all errors............................................................... 278Client-side Error Handling..................................................................................................285Conclusion.............................................................................................................................290The paid versions of this book contain two additional chapters: Chapter 9, SurvivingConcurrent Queries and Chapter 10, Surviving Concurrent Modifications. See theIntroduction for further details.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!