1

请参阅以下内容:

Using scope As New System.Transactions.TransactionScope
//Create instance of connection 1 and open 
//Create instance of connection 2 and open
//Create instance of connection 3 and open
scope.complete()
End Using

有没有办法从交易中排除连接 2。原因是connection2连接的数据库服务器没有启用事务。我计划启用它,但它必须经过“更改过程”,这需要数周时间。因此,我正在寻找一个快速的胜利。

4

1 回答 1

1

您可以在事务之前简单地创建第二个连接:

//Create instance of connection 2 and open
Using scope As New System.Transactions.TransactionScope
//Create instance of connection 1 and open 
//Create instance of connection 3 and open
scope.complete()
End Using
于 2013-10-30T12:04:52.253 回答