Mark Baldwin
3/29/2007 9:08:00 AM
I am using .NET 2.0 with SQL2000. I have a simple test program for the
TransactionScope() object with encapsulates 2 calls using stored procedures
that are defined within a dataset. For example...
using (TransactionScope scope = new
TransactionScope(TransactionScopeOption.Required))
{
DataSetTestTableAdapters.testtableTableAdapter ta = new
DataSetTestTableAdapters.testtableTableAdapter();
int id = 0;
ta.NewEntry(205, "FROM UI", ref id);
ta.UpdateB(id + 1, "CHANGED");
scope.Complete();
}
Initially I got some error about remote transactions not being allowed. I
fixed this by randomly ticking options in MSDTC properties until it worked
but now I just get a timeout error (after 30 seconds even though MSDTC and
TransactionScope() default to 60 seconds!). After the timeout, if I run the
code again I get...
[System.Transactions.TransactionException] = {"The transaction has already
been implicitly or explicitly committed or aborted."}
Does anybody know where I can find documentation on fixing issues with MSDTC
and .NET 2.0/SQL2000?
--
Best regards
Mark