transactionscope aborted

“transactionscope aborted”相关的资料有哪些?“transactionscope aborted”相关的范文有哪些?怎么写?下面是小编为您精心整理的“transactionscope aborted”相关范文大全或资料大全,欢迎大家分享。

关于TransactionScope的DEMO

标签:文库时间:2025-03-16
【bwwdw.com - 博文网】

关于TransactionScope的DEMO

1.同一个Scope里多个本地连接。 先把官网上的代码贴过来:

// This function takes arguments for 2 connection strings and commands to create a transaction

// involving two SQL Servers. It returns a value > 0 if the transaction is committed, 0 if the

// transaction is rolled back. To test this code, you can connect to two different databases

// on the same server by altering the connection string, or to another 3rd party RDBMS by

// altering the code in the connection2 code block.

static public int CreateTransactionScope(

string conn