Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » SQL Anywhere .NET 2.0 API Reference » SAConnection class » BeginTransaction methods

BeginTransaction() method Next Page

BeginTransaction(IsolationLevel) method


Returns a transaction object. Commands associated with a transaction object are executed as a single transaction. The transaction is terminated with a call to the Commit or Rollback methods.

Syntax

Visual Basic

Public Function BeginTransaction( _
ByVal isolationLevel As IsolationLevel _
) As SATransaction

C#

public SATransaction BeginTransaction(
IsolationLevel isolationLevel
);

Parameters
Return value

An SATransaction object representing the new transaction.

Remarks

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

Example
SATransaction tx = conn.BeginTransaction(
    SAIsolationLevel.ReadUncommitted );
See also