Modifica

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
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("OleDbConnection is not AOT-compatible.")]
public sealed class OleDbTransaction : System.Data.Common.DbTransaction
public sealed class OleDbTransaction : System.Data.Common.DbTransaction
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("OleDbConnection is not AOT-compatible.")>]
type OleDbTransaction = class
    inherit DbTransaction
type OleDbTransaction = class
    inherit DbTransaction
Public NotInheritable Class OleDbTransaction
Inherits DbTransaction
Inheritance
Attributes

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

Name Description
Connection

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

IsolationLevel

Specifies the IsolationLevel for this transaction.

Methods

Name Description
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.

Rollback()

Rolls back a transaction from a pending state.

Applies to

See also