on 2012 Jul 24 12:04 PM
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).
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
13 | |
10 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.