Mono Class Library: System.Data.SqlClient.SqlConnection Overview | Members

System.Data.SqlClient.SqlConnection.BeginTransaction Method

Begins a new database transaction with a specified System.Data.IsolationLevel and transaction name.

public SqlTransaction BeginTransaction (System.Data.IsolationLevel iso, string transactionName)

Parameters

iso
An System.Data.IsolationLevel to initialize the transaction with.
transactionName
A string value representing the desired transaction name.

Returns

A new instance of the System.Data.SqlClient.SqlTransaction class that references the current System.Data.SqlClient.SqlConnection instance.

Remarks

Creates and initializes a new System.Data.SqlClient.SqlTransaction instance associated with the current System.Data.SqlClient.SqlConnection.

The new transaction is created using the provided System.Data.IsolationLevel and transaction name.

The System.Data.SqlClient.SqlConnection class only supports a single transaction. The creation of more will raise an InvalidOperationException exception.

Requirements

Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0