Metodo CommitTrans

Esegue il commit della transazione, rendendo permanenti tutte le modifiche apportate durante la transazione.

Sintassi

Object.CommitTrans()

Argomenti - Object: obbligatorio. Sempre il nome dell'oggetto ADODB.Connection.

Note

Nell'esempio seguente viene illustrato l'uso del metodo CommitTrans.

Esempio 1

'Create ADODB.Connection Object
Dim ConnObj   ' Create a variable.
Set ConnObj = CreateObject("ADODB.Connection")
ConnObj.Open("ConnectionString") 'Creates DB Connection by Using Connection String

ConnObj.BeginTrans()
'Execute multiple queries based on requirement
ConnObj.CommitTrans() 'Commits the transaction
ConnObj.Close()
Set ConnObj = Nothing