I've written some Tx code that works fine against SQL2K but complains that the transaction is aborted when running against SQLExpress...
using (TransactionScope transactionScope = new TransactionScope())
{
using (SqlConnection sqlConnection = new SqlConnection(connectionString))
{
sqlConnection.Open();
MessageBox.Show("Tx:" + System.Transactions.Transaction.Current.Identifier.ToString());
transactionScope.Consistent = true;
}
} // transaction scope finished, commit/rollback on Dispose() !!! ERROR HERE !!!
I've applied a COM+Rollup to WinXPro but it doesn't seem to help. What's going on? BTW The transaction starts ok,
although unexpectedly it is showing as a DTC transaction in COM+ Explorer statistics, and there are no SQL Errors.
pkr
Star
9197 Points
1860 Posts
Trouble with System.Transactions
Aug 12, 2004 05:11 PM|LINK
using (TransactionScope transactionScope = new TransactionScope()) { using (SqlConnection sqlConnection = new SqlConnection(connectionString)) { sqlConnection.Open(); MessageBox.Show("Tx:" + System.Transactions.Transaction.Current.Identifier.ToString()); transactionScope.Consistent = true; } } // transaction scope finished, commit/rollback on Dispose() !!! ERROR HERE !!!I've applied a COM+Rollup to WinXPro but it doesn't seem to help. What's going on? BTW The transaction starts ok, although unexpectedly it is showing as a DTC transaction in COM+ Explorer statistics, and there are no SQL Errors.