Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

OleDbConnection::BeginTransaction Method ()

 

Starts a database transaction with the current IsolationLevel value.

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

public:
OleDbTransaction^ BeginTransaction()

Return Value

Type: System.Data.OleDb::OleDbTransaction^

An object representing the new transaction.

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.

The following example creates an OleDbConnection and an OleDbTransaction. 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
Available since 1.1
Return to top
Show:
© 2017 Microsoft