OleDbTransaction Class

Definition

Represents an SQL transaction to be made at a data source. This class cannot be inherited.

public ref class OleDbTransaction sealed : System::Data::Common::DbTransaction
public ref class OleDbTransaction sealed : MarshalByRefObject, IDisposable, System::Data::IDbTransaction
public sealed class OleDbTransaction : System.Data.Common.DbTransaction
public sealed class OleDbTransaction : MarshalByRefObject, IDisposable, System.Data.IDbTransaction
type OleDbTransaction = class
    inherit DbTransaction
type OleDbTransaction = class
    inherit MarshalByRefObject
    interface IDbTransaction
    interface IDisposable
Public NotInheritable Class OleDbTransaction
Inherits DbTransaction
Public NotInheritable Class OleDbTransaction
Inherits MarshalByRefObject
Implements IDbTransaction, IDisposable
Inheritance
OleDbTransaction
Inheritance
Inheritance
OleDbTransaction
Implements

Remarks

The application creates an OleDbTransaction object by calling BeginTransaction on the OleDbConnection object. All subsequent operations associated with the transaction (for example, committing or aborting the transaction), are performed on the OleDbTransaction object.

Properties

Connection

Gets the OleDbConnection object associated with the transaction, or null if the transaction is no longer valid.

DbConnection

When overridden in a derived class, gets the DbConnection object associated with the transaction.

(Inherited from DbTransaction)
IsolationLevel

Specifies the IsolationLevel for this transaction.

Methods

Begin()

Initiates a nested database transaction.

Begin(IsolationLevel)

Initiates a nested database transaction and specifies the isolation level to use for the new transaction.

Commit()

Commits the database transaction.

CommitAsync(CancellationToken)

Asynchronously commits the database transaction.

(Inherited from DbTransaction)
CreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited from MarshalByRefObject)
Dispose()

Releases the unmanaged resources used by the DbTransaction.

(Inherited from DbTransaction)
Dispose(Boolean)

Releases the unmanaged resources used by the DbTransaction and optionally releases the managed resources.

(Inherited from DbTransaction)
DisposeAsync()

Asynchronously diposes the transaction object.

(Inherited from DbTransaction)
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
InitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited from MarshalByRefObject)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.

(Inherited from MarshalByRefObject)
Rollback()

Rolls back a transaction from a pending state.

RollbackAsync(CancellationToken)

Asynchronously rolls back a transaction from a pending state.

(Inherited from DbTransaction)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IDbTransaction.Connection

Gets the DbConnection object associated with the transaction, or a null reference if the transaction is no longer valid.

(Inherited from DbTransaction)
IDisposable.Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Applies to

See also