A Microsoft® Transaction Server (MTS) transaction is a unit of work that is performed as an atomic operation. In the ASP environment, transactions occur on a per-page level. To mark an ASP as one that requires a transaction, you include the following script at the top of the page:
<%@ LANGUAGE=VBScript Transaction=Required%>
When you mark a page as transacted, all of the work that occurs on that page becomes part of the same transaction context. The objects that are created on the page, and the work performed by those objects, becomes part of that transaction context, provided that those objects are registered on the server system as MTS components. In the event of an error, the work performed by those objects can be rolled back, and the objects rendered stateless.
Suppose, for example, that you create a page that includes an object that uses the Microsoft® ActiveX® Data Objects (ADO) to insert or update data in a database. In the event that this component fails, you can call the MTS ObjectContext object’s SetAbort method to abort the transaction in which that object participates, and all of the modifications made by the object to the database are rolled back.