Customization > Automation Interface > Working with Object Attributes and Associations (Item Properties and Links) > Using transactions (automation interface)
  
Using transactions (automation interface)
The automation interface supports the use of transactions to update a database.
Using a transaction to update a database guarantees integrity by ensuring that all the transaction's updates either succeed or fail. Using transactions can also improve performance and allows you to undo the changes in Modeler through an Edit Undo operation.
* 
If an error is thrown during a transaction, you must roll back the transaction to ensure that it has not been partly committed.
You cannot abort an inner transaction and commit an outer one.
This example shows how to group updates in a single transaction.
Note that the scripting engine used by Modeler does not support the GoTo statement.
Public Sub Test()
On Error GoTo TxnError
ArtisanProject("Transaction") = "Begin"
<Your updates go here>
ArtisanProject("Transaction") = "Commit"

TxnError:
ArtisanProject("Transaction") = "Abort"
End Sub