替代使用System.Transactions的时节省点 [英] Alternative to Save point when using System.Transactions

查看:177
本文介绍了替代使用System.Transactions的时节省点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何使用的类 System.Transactions的命名空间来达到类似的效果,我可以使用的 SqlTransaction.Save(保存点)和的 SqlTransaction.Rollback(保存点)。使用这两种方法的效果是能够创建命名保存点在运行的事务和问题的情况下回滚只保存点(之前创建的保存点操作都不会回退)。

How can I use classes from System.Transactions namespace to achieve similar effect as I can get when using SqlTransaction.Save(savePoint) and SqlTransaction.Rollback(savePoint). The effect of using these two methods is ability to create named save point in the running transaction and in case of issue rollback only to the save point (operations created before save point are not rolled back).

推荐答案

保存点是在具体的实施过程中的数据库。甲骨文实现了他们,显然也是如此SQL服务器。

Save Points are database specific in part of their implementation. Oracle implements them, and apparently so does SQL server.

System.Transactions的是专为全口径的交易,而不是中间保存点一带事务的方式。

System.Transactions is designed for full-bore transactions, and not intermediate save points along the way of a transaction.

唉,因为这将是不错的,在最低公分母数据库此功能支持:ACCESS JET

Alas, because it would be nice to have this feature in the lowest-common denominator database supported: ACCESS JET.

这篇关于替代使用System.Transactions的时节省点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆