BeginTransaction method

Description

Returns a transaction object. Commands associated with a transaction object are executed as a single transaction. The transaction is terminated with a Commit() or Rollback().

Syntax 1

AseTransaction BeginTransaction( )

Syntax 2

AseTransaction BeginTransaction( IsolationLevel isolationLevel )

Parameters

isolationLevel: A member of the IsolationLevel enumeration. The default value is ReadCommitted.

Return value

An object representing the new transaction.

Usage

To associate a command with a transaction object, use the AseCommand.Transaction property.

Example

AseTransaction tx = conn.BeginTransaction(IsolationLevel.ReadUncommitted );

See also

“Commit method”, “Rollback method”, “Transaction processing”, and the Adaptive Server Enterprise System Administration Guide for information about inconsistencies.