<%@ TRANSACTION=Required LANGUAGE="JScript" %> Syntax Error Abort within a Transactional Web Page Syntax Error Abort within a Transactional Web Page

This is an example demonstrating how a runtime error (that will stop the execution of the ASP page), will force an abort within the Transacted Web Page. When an abort occurs, all transacted changes within this web page (Database, MSMQ Message Transmission, etc.) will be rolled back to their previous state -- guarenteeing data integrity. <% // Syntax Error that will produce abort blah.blah(); %> <% // The Transacted Script Commit Handler. This function // will be called if the transacted script commits. // Note that in the example above, there is no way for the // script not to abort. function OnTransactionCommit() { Response.Write ("

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

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