Compartir a través de


Committing and Terminating Transactions

Because Component Services tracks transaction processing, it determines whether a transaction has completed successfully or failed. A script can explicitly declare that it is terminating a transaction by calling the ASP built-in object method ObjectContext.SetAbort. For example, your script might terminate a transaction if it receives an error from a component, if a business rule is violated (for example, if the account balance falls below 0), or if a nontransactional operation (such as reading from or writing to a file) fails. The transaction is also aborted if the page times out before the transaction is completed.