Processing Transactions

The integration of IIS and Microsoft Transaction Server (MTS) has made it easy to manage transactions. For all transactions, the "unit of work" is the ASP page. Transactional pages begin with the new @-directive, <% transaction=required %>. For these pages, a new ASP built-in object, ObjectContext, is created that can be used to commit or abort the transaction. Unless the SetAbort method is called, the transaction will commit automatically when the page has completed processing. You may also define two additional event handlers on transactional pages, OnTransactionCommit and OnTransactionAbort. Only one of these subroutines will be called, depending on the outcome of the transaction.

For more information on MTS transactions, see Transactions in the Microsoft Transaction Server Programmer's Guide. To view samples of transactional scripting, see Creating Transactional Scripts in the Active Server Pages documentation.