IDbConnection.BeginTransaction IDbConnection.BeginTransaction IDbConnection.BeginTransaction IDbConnection.BeginTransaction Method

定义

开始一项数据库事务。Begins a database transaction.

重载

BeginTransaction() BeginTransaction() BeginTransaction() BeginTransaction()

开始一项数据库事务。Begins a database transaction.

BeginTransaction(IsolationLevel) BeginTransaction(IsolationLevel) BeginTransaction(IsolationLevel) BeginTransaction(IsolationLevel)

以指定的 IsolationLevel 值开始数据库事务。Begins a database transaction with the specified IsolationLevel value.

BeginTransaction() BeginTransaction() BeginTransaction() BeginTransaction()

开始一项数据库事务。Begins a database transaction.

public:
 System::Data::IDbTransaction ^ BeginTransaction();
public System.Data.IDbTransaction BeginTransaction ();
abstract member BeginTransaction : unit -> System.Data.IDbTransaction
Public Function BeginTransaction () As IDbTransaction

返回

表示新事务的对象。An object representing the new transaction.

注解

事务完成后, 你必须使用CommitRollback方法显式提交或回滚事务。Once the transaction has completed, you must explicitly commit or roll back the transaction by using the Commit or Rollback methods.

BeginTransaction(IsolationLevel) BeginTransaction(IsolationLevel) BeginTransaction(IsolationLevel) BeginTransaction(IsolationLevel)

以指定的 IsolationLevel 值开始数据库事务。Begins a database transaction with the specified IsolationLevel value.

public:
 System::Data::IDbTransaction ^ BeginTransaction(System::Data::IsolationLevel il);
public System.Data.IDbTransaction BeginTransaction (System.Data.IsolationLevel il);
abstract member BeginTransaction : System.Data.IsolationLevel -> System.Data.IDbTransaction
Public Function BeginTransaction (il As IsolationLevel) As IDbTransaction

参数

返回

表示新事务的对象。An object representing the new transaction.

注解

事务完成后, 必须使用CommitRollback方法显式提交或回滚事务。Once the transaction has completed, you must explicitly commit or roll back the transaction using the Commit or Rollback methods.

适用于