System.Data.Odbc.OdbcConnection.BeginTransaction Method

Starts a transaction at the data source.

Syntax

public OdbcTransaction BeginTransaction ()

Returns

An object representing the new transaction.

Remarks

To commit or roll back the transaction, you must explicitly use the OdbcTransaction.Commit or OdbcTransaction.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.

Note:

If you do not specify an isolation level, the isolation level will be determined by the driver being used. To specify an isolation level with the OdbcConnection.BeginTransaction method, use the overload that takes the isolevel parameter.

Requirements

Namespace: System.Data.Odbc
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0