The forum will be down for maintenance at some point from Friday, August 24 at 19:00 EDT until Sunday, August 26 at 23:59 EDT. Downtime will be minimized but the exact timing is unknown.

I have an application that requires transactions, this in itself is not a problem. I like using the TransactionScope class when i require a transaction because it helps keep my code readable.

If i use the TransactionScope class when connecting to Sql Anywhere it forces me to use the DTC, if i use the BeginTransaction() method on the connection it works without the DTC.

I would like to know if there is any means to use the TransactionScope class without enlisting the DTC.

Note: I have one connection and two to three commands (in different parts of my code).

asked 24 Jul '12, 11:04

Robert2's gravatar image

accept rate: 0%


FWIW more information on this general topic may be found in Avoid unwanted Escalation to Distributed Transactions and the related Q&As in stackoverflow.

(24 Jul '12, 11:37) Breck Carter

Sadly, the answer to your question is no. .NET will happily avoid using DTC for transactions that involve only one data source if the data source supports LTM (the Lightweight Transaction Manager); but neither the SA client nor server have LTM support. Hence, .NET has no choice but to immediately promote the transaction to DTC.


permanent link

answered 24 Jul '12, 12:33

Karim%20Khamis's gravatar image

Karim Khamis
accept rate: 40%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 24 Jul '12, 11:04

question was seen: 1,953 times

last updated: 24 Jul '12, 12:33