Small company logo:
   History
 
Advertising banner:
 
 Connection.Commit
Home • Help • Customization Tools • FCAS • Language Reference • Connection.Commit
 
Purpose
Commits a transaction on a data source.
7202010_20004_0.png        Note
This method is only available to data sources that support transactions. Commit is not a valid operation for connections that have AutoCommit turned on.
Syntax
DBConnection.Commit
Example
Sub Main()
        Dim cnct as DBConnection
        cnct.OpenConnection("MyDSN")    'Open the data source "MyDSN"
        cnct.AutoCommit = SQL_AUTOCOMMIT_OFF    
'Begin the transaction
        ' Create statements and execute SQL...
        ' ...
If (UserClickedCancel = TRUE)
        cnct.Rollback           'Rollback changes
Else
        cnct.Commit 'Commit changes
End if
        cnct.CloseConnection    'Close the connection   
End Sub