开发者

Connect to an existing transaction on SQL Server using C#

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜