Export (0) Print
Expand All

IDbTransaction Interface

Represents a transaction to be performed at a data source, and is implemented by .NET Framework data providers that access relational databases.

Namespace: System.Data
Assembly: System.Data (in system.data.dll)

public interface class IDbTransaction : IDisposable
public interface IDbTransaction extends IDisposable
public interface IDbTransaction extends IDisposable

The IDbTransaction interface allows an inheriting class to implement a Transaction class, which represents the transaction to be performed at a data source. For more information about Transaction classes, see Performing Transactions. For more information about implementing .NET Framework data providers, see Implementing a .NET Framework Data Provider.

An application does not create an instance of the IDbTransaction interface directly, but creates an instance of a class that inherits IDbTransaction.

Classes that inherit IDbTransaction must implement the inherited members, and typically define additional members to add provider-specific functionality. For example, the IDbTransaction interface defines the Commit method. In turn, the OleDbTransaction class inherits this property, and also defines the Begin method.

Notes to Implementers To promote consistency among .NET Framework data providers, name the inheriting class in the form Prv Transaction where Prv is the uniform prefix given to all classes in a specific .NET Framework data provider namespace. For example, Sql is the prefix of the SqlTransaction class in the System.Data.SqlClient namespace.

The following example creates instances of the derived classes, SqlConnection and SqlTransaction. 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.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft