Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











METHOD   Connection::CommitTrans

connectionobject.CommitTrans

The CommitTrans method saves all pending changes made since the last BeginTrans method call was used to initiate a transaction.
 
For example, a transaction could be a monetary transfer between two accounts. First, you would withdraw money from one account and next you would deposit the money into a second account. Both actions must be correctly accomplished for such a transaction to be considered completed.
 
Since transactions can be nested, all lower-level transactions must be resolved before you can resolve higher-level transactions. (i.e., level 3 transactions must be either committed or cancelled before level 2, etc.)
 
This method is only used to save a new transaction. Beginning or cancelling a transaction requires the use of the BeginTrans and RollbackTrans methods.
 
Not all providers allow transactions. You can search the Properties Collection to see if the Transaction DDL property occurs as part of the collection.
 
The provider will automatically start a new transaction after a RollbackTrans call, if the Attributes property of the Connection object is set to adXactCommitAbort.
 
Code (VBScript):
If MsgBox("Save all changes?", vbYesNo) = vbYes Then
   objConnection.CommitTrans
Else
   objConnection.RollbackTrans
End If

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information