English 中文(简体)
Transaction handling with TransactionScope
原标题:

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx

I just want to confirm that is there any issue when using TransactionScope with Tableadapters?

I have read this article and read some issues with this, but the article was 2.5 years old http://blog.falafel.com/2007/04/09/GettingTableAdaptersToParticipateInTransactions.aspx

I hope in latest version of .Net Framework, the issue has been resolved

I am using .Net framework 3.5 version

Thanks

最佳回答

I do not thing that the article is 100% correct.

Transaction scope will automatically change the transaction to a distributed transaction if you connect to more than one database or connect to a single database with more than one connection.

The code that the article writer is using is generating more than one connection to the database. It is therefore trying to use MS DTC (the distributed transaction coordinator), if this is not set up correctly the transaction will fail.

We use Transaction Scope everywhere we need a transaction, whenever we have had a problem it has been due to our code or configuration.

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签