开发者

IDbTransaction and IDisposable

MSDN do not define what Disposeshould do for transactions. So my guess is that ADO.NET drivers do not do anything s开发者_如何学Gopecial in it (other than cleaning up resources)?

It would be lovely if it called Rollback if neither of Commit and Rollback has not been called before Dispose.


The behavior (although this may not be officially documented) is to Rollback() if a successful call to Commit() has not occurred prior to the Dispose() being called. This can be verified by disassembling the .NET System.Data assemblies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜