Search Results for

    Show / Hide Table of Contents

    Interface IAdbTransaction

    An Adb database transaction, which works in the same way as the underlying .NET DbTransaction, with extra information and functionality. It is created by calling one of the BeginTransaction() overloads.

    Note that the AdbTransaction instance is not thread-safe, and must only be used in a single place (in a single worker) at any one time. It must be disposed after use. Disposal should almost always be done by whoever created the connection, typically via DisposeOnFinished<TDisposable>(TDisposable) or UsingActionWorker<TDisposable> if used across multiple method calls, or by a using statement if created and disposed in a single method and thread, without being passed to any other workers. See Disposing Disposables for details.

    Note: Using AdbTransaction with full error handling is somewhat involved. Please use AdbTransactionActionWorker where possible, which is simpler since it comes pre-configured to run database commands and child workers within a transaction.

    Namespace: actionETL.Adb
    Assembly: actionETL.dll
    Syntax
    public interface IAdbTransaction

    Properties

    Connection

    Gets the connection for the transaction, or null if the transaction is no longer valid.

    Declaration
    AdbConnection Connection { get; }
    Property Value
    Type Description
    AdbConnection

    IsolationLevel

    Gets the IsolationLevel for this transaction. The default is ReadCommitted.

    Declaration
    IsolationLevel IsolationLevel { get; }
    Property Value
    Type Description
    IsolationLevel

    Methods

    Commit()

    Commits the database transaction.

    Declaration
    void Commit()
    Exceptions
    Type Condition
    Exception
    • An error occurred while trying to commit the transaction.
    • (See the provider documentation for specific Commit() exceptions.)
    InvalidOperationException
    • The transaction has already been committed or rolled back.
    • The connection is broken.

    Rollback()

    Rolls back the transaction from a pending state.

    Declaration
    void Rollback()
    Exceptions
    Type Condition
    Exception
    • An error occurred while trying to rollback the transaction.
    • (See the provider documentation for specific Rollback() exceptions.)
    InvalidOperationException
    • The transaction has already been committed or rolled back.
    • The connection is broken.

    See Also

    AdbTransaction
    AdbTransactionActionWorker
    In This Article
    Back to top Copyright © 2023 Envobi Ltd