DekGenius.com
[ Team LiB ] Previous Section Next Section

OleDbTransaction marshal by reference, disposable

System.Data.OleDb (system.data.dll) sealed class

This class encapsulates a client-initiated database transaction. If you have an open connection, you can start a transaction by calling the OleDbConnection.BeginTransaction( ) method, which returns an OleDbTransaction object. The OleDbTransaction class implements the System.Data.IDbTransaction interface, and its members are described in that section of the reference.

You can also use the Begin( ) method to start a nested transaction (a transaction within the bounds of another transaction). This returns a second OleDbTransaction instance, which can be used to manage the nested transaction. The actions in the nested transaction can be committed or rolled back independently; however, if you roll back the parent transaction, the actions in the nested transaction are also rolled back (even if you committed the nested transaction).

public sealed class OleDbTransaction : MarshalByRefObject , System.Data.IDbTransaction, IDisposable {
// Public Instance Properties
   public OleDbConnection Connection{get; } 
   public IsolationLevel IsolationLevel{get; }                 // implements System.Data.IDbTransaction
// Public Instance Methods
   public OleDbTransaction Begin(  );  
   public OleDbTransaction Begin(System.Data.IsolationLevel isolevel);
   public void Commit(  );                                       // implements System.Data.IDbTransaction
   public void Rollback(  );                                     // implements System.Data.IDbTransaction
// Protected Instance Methods
   protected override void Finalize(  );                         // overrides object
}

Hierarchy

System.Object figs/U2192.gif System.MarshalByRefObject figs/U2192.gif OleDbTransaction(System.Data.IDbTransaction, System.IDisposable)

Returned By

OleDbCommand.Transaction , OleDbConnection.BeginTransaction( )

Passed To

OleDbCommand.{OleDbCommand( ) , Transaction}

    [ Team LiB ] Previous Section Next Section