Notifies that a transaction has begun and that all modifications to the database
are only committed after a call to Commit. Alternatively, if
Rollback is called then all changes are aborted. To execute other
statements for the transaction call the Execute and ExecuteNonQuery functions.
Because all changes to the database must be executed on the same connection
DatabaseObjects maintains an open connection until the Commit or Rollback functions
are called. When transactions are not being used connections are opened and closed
for each SQL statement executed i.e. (INSERT/UPDATE/SELECT...).
Namespace: DatabaseObjectsAssembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0
Syntax
C# |
---|
public void Begin( IsolationLevel eIsolationLevel ) |
Visual Basic |
---|
Public Sub Begin ( _ eIsolationLevel As IsolationLevel _ ) |
Visual C++ |
---|
public: void Begin( IsolationLevel eIsolationLevel ) |
Parameters
- eIsolationLevel
- Type: System.Data..::..IsolationLevel
[Missing <param name="eIsolationLevel"/> documentation for "M:DatabaseObjects.Database.TransactionsClass.Begin(System.Data.IsolationLevel)"]
Examples
CopyC#
Public Sub Shadows Save() Mybase.ParentDatabase.Transactions.Begin() MyBase.Save Me.Details.Save 'Execute any other statements here via 'MyBase.ParentDatabase.Transactions.Execute()... Mybase.ParentDatabase.Transactions.Commit() End sub