Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
返回事务对象。
Public Shadows Function BeginTransaction() As ULTransaction
public new ULTransaction BeginTransaction()
一个表示新事务的 ULTransaction 对象。
ULException 类 连接已关闭。
InvalidOperationException ULConnection 类不支持并行事务。
将与事务对象关联的命令作为单个事务执行。使用 ULTransaction.Commit 方法或 ULTransaction.Rollback 方法终止事务。
使用 IsolationLevel.ReadCommitted 值创建事务。
要将命令与事务对象相关联,请使用 ULCommand.Transaction 属性。当前事务会自动与 ULConnection.CreateCommand 方法所创建的命令相关联。
缺省情况下,连接不使用事务,且所有命令均会在执行时自动提交。提交或回退当前事务后,连接即会恢复为自动提交模式和前一个隔离级别,直至下一次调用 BeginTransaction 方法。
与 ADO.NET 的 IsolationLevel 文档相比,UltraLite 的每个隔离级别定义稍有不同。
这是 System.Data.IDbConnection.BeginTransaction 方法和 System.Data.Common.DbConnection.BeginTransaction() 方法的强类型版本。