且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

的SqlTransaction已完成

更新时间:2023-12-05 11:14:58

感谢所有的反馈。我一直在与有人从MSFT在MSDN论坛弄清楚发生了什么事情。原来,这个问题是由于一个失败,由于日期时间转换问题的刀片。

Thanks for all the feedback. I've been working with someone from MSFT on the MSDN forums to figure out what's going on. It turns out the issue is due to one of the inserts failing due to a date time conversion problem.

的主要问题是,这个错误显示出来,如果​​它是一个日期转换错误。但是,如果它是另一个错误,如现场太长时间不会导致此问题。在这两种情况下,我希望该交易仍然存在,所以我可以调用回滚就可以了。

The major problem is the fact that this error shows up if it's a date conversion error. However, if it's another error such as a field being too long it doesn't cause this issue. In both cases I would expect the transaction to still exist so I can call Rollback on it.

我有一个完整的示例程序来复制这个问题。如果有人希望看到它或MSFT的交流,你可以找到关于MSFT的新闻组线程在SqlTransaction.ZombieCheck错误线程下microsoft.public.dotnet.framework.adonet。

I have a full sample program to replicate this issue. If anyone wishes to see it or the exchange with MSFT you can find the thread on MSFT's newsgroups in microsoft.public.dotnet.framework.adonet under the SqlTransaction.ZombieCheck error thread.