Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - 编程 » SQL Anywhere 数据访问 API » SQL Anywhere .NET 2.0 API 参考 » iAnywhere.Data.SQLAnywhere 命名空间 (.NET 2.0) » SAConnection 类 » BeginTransaction 方法

 

BeginTransaction(SAIsolationLevel) 方法

返回事务对象。将与事务对象关联的命令作为单个事务执行。通过调用 Commit 或 Rollback 方法终止事务。

语法
Visual Basic

Public Function BeginTransaction( _
   ByVal isolationLevel As SAIsolationLevel _
) As SATransaction
C#

public SATransaction BeginTransaction(
   SAIsolationLevel isolationLevel
);
参数
  • isolationLevel   SAIsolationLevel 枚举的一个成员。缺省值为 ReadCommitted。

返回值

表示新事务的 SATransaction 对象。

有关详细信息,请参见事务处理

有关详细信息,请参见典型的不一致类型

注释

若要将命令与事务对象关联,请使用 SACommand.Transaction 属性。

另请参见