<%@ TRANSACTION=Required LANGUAGE="VBScript" %> <% Option Explicit %> Forced Abort with a Transactional Web Page Forced Abort with a Transactional Web Page

This is an example demonstrating a forced abort within a Transacted Web Page. When an abort occurs, all transacted changes within this web page (Database Access, MSMQ Message Transmission, etc.) will be rolled back to their previous state -- guarenteeing data integrity. <% ' Abort Transaction ObjectContext.SetAbort %> <% ' The Transacted Script Commit Handler. This sub-routine ' will be called if the transacted script commits. ' Note that in the example above, there is no way for the ' script not to abort. Sub OnTransactionCommit() Response.Write "

The Transaction just comitted." Response.Write "This message came from the " Response.Write "OnTransactionCommit() event handler." End Sub ' The Transacted Script Abort Handler. This sub-routine ' will be called if the transacted script aborts ' Note that in the example above, there is no way for the ' script not to abort. Sub OnTransactionAbort() Response.Write "

The Transaction just aborted." Response.Write "This message came from the " Response.Write "OnTransactionAbort() event handler." End Sub %>