Export (0) Print
Expand All

OracleConnection.BeginTransaction Method

Begins a transaction at the database.

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

member BeginTransaction : unit -> OracleTransaction

Return Value

Type: System.Data.OracleClient.OracleTransaction
An object representing the new transaction.

ExceptionCondition
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.

NoteNote

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.

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
Show:
© 2015 Microsoft