OracleConnection::BeginTransaction Method ()
Begins a transaction at the database.
Assembly: System.Data.OracleClient (in System.Data.OracleClient.dll)
Return Value
Type: System.Data.OracleClient::OracleTransaction^An object representing the new transaction.
| Exception | Condition |
|---|---|
| InvalidOperationException | Parallel transactions are not supported. |
To commit or roll back the transaction, you must explicitly use the Commit or Rollback methods.
To ensure that the .NET Framework Data Provider for Oracle transaction management model performs correctly, avoid using other transaction management models, such as those provided by the database.
Note |
|---|
If you do not specify an isolation level, the default isolation level is used. To specify an isolation level with the BeginTransaction method, use the BeginTransaction overload. |
The following example creates an OracleConnection and an OracleTransaction. It also demonstrates how to use the BeginTransaction, Commit, and Rollback methods.
Available since 1.1
