• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Designing SQL Server Stored P... > Stored Procedures and Transactions

Stored Procedures and Transactions

It is a good idea to place transactions in all of the stored procedures that you build. Transactions ensure that a piece of work is completed in its entirety or not at all. One of the classic examples is a banking transaction. You want all the debits and credits to complete properly or not at all. This is where transactions come in.

You might have used the BEGINTRANS, COMMITTRANS, and ROLLBACK methods in data access objects (DAOs) going against Access data. These DAO methods are appropriate when going against an Access back end. When using a SQL Server back end, you should instead place all transaction processing inside the stored procedures that you build.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint