O'Reilly logo

Delphi for .NET Developer’s Guide by Xavier Pacheco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Transaction Processing

Often, updates to tables must occur as a grouped operation. For instance, suppose that within an operation you must update multiple tables. If the update operation on any of the tables fails, the entire operation must fail. This includes previous updates to other tables within the same operation.

This type of protection can be achieved using transaction processing. Transactions are statements that define the beginning and ending of operation boundaries. Transactions are represented by the SqlTransaction class. This class is returned as the result of the SqlConnection.BeginTransaction() method.

When a transaction is invoked, all operations through the specified connection occur within the transaction’s boundaries. When the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required