Export (0) Print
Expand All

OdbcConnection.BeginTransaction Method (IsolationLevel)

Starts a transaction at the data source with the specified IsolationLevel value.

Namespace:  System.Data.Odbc
Assembly:  System.Data (in System.Data.dll)

member BeginTransaction : 
        isolevel:IsolationLevel -> OdbcTransaction

Parameters

isolevel
Type: System.Data.IsolationLevel

The transaction isolation level for this connection. If you do not specify an isolation level, the default isolation level for the driver is used.

Return Value

Type: System.Data.Odbc.OdbcTransaction
An object representing the new transaction.

ExceptionCondition
InvalidOperationException

A transaction is currently active. Parallel transactions are not supported.

To commit or roll back the transaction, you must explicitly use the Commit or Rollback methods.

To make sure that the .NET Framework Data Provider for ODBC transaction management model performs correctly, avoid using other transaction management models, such as those provided by the data source.

The following example creates an OdbcConnection and an OdbcTransaction. It also demonstrates how to use the BeginTransaction, Commit, and Rollback methods.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft