In the database, the so-called transaction refers to a set of logical operations units that transform data from one state to another. In order to ensure the consistency of data in the database, the data should be manipulated with discrete groups of logical units, so that the data consistency can be maintained when the data is completed, and when a part of the operation fails, the entire transaction is ignored and all operations after the starting point are returned to the starting state. Three ways to implement ASP processing: Method One Using the Connection object in the ASP built-in ADO component, we can implement the transactional processing of database operations Connection.begintrans method: Start a transaction Connection.committrans method: Complete/ Commit Transaction Connection.rollbacktrans method: Undo/Discard Transaction method Two can take advantage of the transaction processing mechanism inside the database system, and complete the transaction processing of data operation by writing the stored procedure containing the transaction in the database server. At the same time, using the ADO component to invoke the stored procedure, you can also determine whether the transaction execution succeeds based on the return code of the stored procedure in the database system, each SQL statement is a transaction. Therefore, each statement is guaranteed to be completed or returned to the beginning. However, if you want the operation of a set of SQL statements to either complete or all invalid, you need to use the transaction mechanism of the database to implement. Method three when implementing transaction processing using the transaction mechanism of the MTS (Microsoft Transaction Server) component, it is important to note that transactions under this mechanism cannot span multiple ASP pages, and if a transaction requires objects from multiple components, You must combine the operations of these objects in an ASP page
ASP transaction Processing