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

Robert2
91348
accept rate: 0%

1

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.

Karim

permanent link

answered 24 Jul '12, 12:33

Karim%20Khamis's gravatar image

Karim Khamis
5.6k53870
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×98
×47

question asked: 24 Jul '12, 11:04

question was seen: 1,633 times

last updated: 24 Jul '12, 12:33