开发者

Connect to an existing transaction on SQL Server using C#

开发者 https://www.devze.com 2022-12-18 22:31 出处:网络
Maybe this question is a little far-fetched but i\'ll give it a shot.. Can i connect to an ongoing tran开发者_运维问答saction in some way?

Maybe this question is a little far-fetched but i'll give it a shot..

Can i connect to an ongoing tran开发者_运维问答saction in some way?

The problem is that i have [C++ Program A] that does various operations on a database and then calls [C# Program B] that does more operation on the same database.

I want all those operations from both programs to run in a single transaction - thus allowing rollback for example.

Is it somehow possible?

Thanks.


No. Transactions are per-connection (in SQL Server, at least).

What you can do is to have a distributed transaction, which will be fully ACID.

0

精彩评论

暂无评论...
验证码 换一张
取 消