我在linq2sql中做了一些需要在事務中運行的操作。但是,我在事務內部使用的一些方法也使用linq2sql,並在它們自己的事務中運行(內部事務在存儲過程中運行)。這使我異常如何使用多個嵌套的事務處理器?
[TransactionInDoubtException: The transaction is in doubt.]
System.Transactions.TransactionStateInDoubt.EndCommit(InternalTransaction tx) +76
with the inner exception
[SqlException (0x80131904): There is already an open DataReader associated with this Command which must be closed first.]
如果我使用MultipleActiveResultSets爲SQL Server,我反而得到的異常
[SqlException (0x80131904): The transaction operation cannot be performed because there are pending requests working on this transaction.]
沒有人有從LINQ2SQL和transactionscopes這樣的工作經驗?
這結束了我的問題上面類似的問題,所以從我的+1 :) – James 2011-01-19 19:41:48