Microsoft® Repository supports the bracketing of multiple changes within the scope of a transaction. Changes to a repository that are bracketed within a transaction are either all committed or all undone, depending upon the way that the transaction is completed. Repository methods that are reading data from the repository may be executed outside of a transaction, but methods that write data must be bracketed within a transaction.
You cannot directly instantiate a RepositoryTransaction object. When you connect to a repository, a RepositoryTransaction object is created for you. It is accessible via the Repository.Transaction property.
Use the RepositoryTransaction object to manage repository transactions.
Property | Description |
Status | The transaction status of the repository. |
Method | Description |
Abort | Cancels the current transaction. |
Begin | Begins a new transaction. |
Commit | Commits the current transaction. |
Flush | Flushes uncommitted changes to the Repository database. |
GetOption | Retrieves various transaction options. |
SetOption | Sets various transaction options. |
Only one transaction may be active at a time for each opened Repository instance. Nesting of Begin or Commit method invocations is permitted, but no actual nesting of transactions occurs.