Esegue il rollback della transazione corrente. Le modifiche apportate dopo la chiamata del metodo BeginTrans verranno annullate.
Sintassi
Object.RollbackTrans()
Argomenti - Object: obbligatorio. Sempre il nome dell'oggetto ADODB.Connection.
Note
Nell'esempio seguente viene illustrato l'uso del metodo RollbackTrans.
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.RollbackTrans() 'Rollback current the transaction
ConnObj.Close()
Set ConnObj = Nothing