且构网

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

.Net嵌套事务范围错误 - MSDTC事务管理器无法提取事务

更新时间:2022-11-21 17:43:33



在您使用该事务的SavePlayer功能中。我认为交易可能会获得主要交易的参考。

或其他一个条件,当你可以面对问题时

当你放置嵌套事务时,它实际上会锁定表。

如果上面的transactino被锁定在表上,并且在打开另一个事务以使用该资源之后你就会遇到这个问题。

您粘贴的代码非常少。所以不知道你的保存更改是做什么的。

但是通常不会重新使用嵌套事务。

可能是这个指针可以帮你解决这个问题
Hi,
in the SavePlayer funtion you have used the transaction. I think it might be possible that the transaction might be getting reference of the main transaction.
or one other condtion when you can face the problem
When you put nested transaction it will actually put a lock on the table.
in case the upper transactino is put lock on the table and after you open another transaction to use that resource you can get this problem.
the code you have pasted is very less. so don't know what your save changes is doing.
but genrally it is not recomanded to use nested transactions.
may be this pointers can help you to solve this problem