InDistributedTransaction = true when creating new connection

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
ve.lin
Posts: 3
Joined: Wed 28 Feb 2018 15:46

InDistributedTransaction = true when creating new connection

Post by ve.lin » Wed 28 Feb 2018 15:57

Hello,
I am trying to connect and call a function in postgresql database using the Devart.Data.PostgreSql db factory, DataContext and function mapping style.

I get "InvalidOperationException: Local transaction can not be started while in a distributed transaction."
when calling the function, but what I've noticed is that the InDistributedTransaction property of the PgSqlConnection is true, as I suppose it should be =false.

My question is how is this property set, and how I can check what is causing this?
Thank you.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: InDistributedTransaction = true when creating new connection

Post by Shalex » Fri 02 Mar 2018 17:45

Please set "Enlist=false;" in your connection string.

For more information, refer to https://www.devart.com/dotconnect/postg ... tring.html.

Does this help?

Post Reply