OleDbConnection::BeginTransaction Method (IsolationLevel)
Starts a database transaction with the specified isolation level.
Assembly: System.Data (in System.Data.dll)
Parameters
- isolationLevel
-
Type:
System.Data::IsolationLevel
The isolation level under which the transaction should run.
| Exception | Condition |
|---|---|
| InvalidOperationException | Parallel transactions are not supported. |
You must explicitly commit or roll back the transaction using the Commit or Rollback method. To make sure that the .NET Framework Data Provider for OLE DB transaction management model performs correctly, avoid using other transaction management models, such as those provided by the data source.
Note |
|---|
If you do not specify an isolation level, the default isolation level for the underlying provider is used. To specify an isolation level with the BeginTransaction method, use the overload that takes the isolationLevel parameter. |
The following example creates an OleDbConnection and an OleDbTransaction. It also demonstrates how to use the BeginTransaction, a Commit, and Rollback methods.
Available since 1.1
