Transaction not getting disposed error

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 1
Joined: Thu 12 Nov 2015 16:40

Transaction not getting disposed error

Post by Zulkar » Thu 12 Nov 2015 18:00

Hi, I use dotConnect MySQL 8.4 Express edition from Devart in my WCF Services. One of my service operation is a part of a distributed transaction using TransactionScope. The transaction seems to be working fine(Commit & Rollback working fine) with only one problem which is being highlighted below.

Problem: After a rollback of a transaction the next hit to database throws following error

Code: Select all

{"The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements."}
This happens only after a Rollback. For Commit its seems to be working fine. So the scenario is something like this:
- I make a call to a method to update some records in database(Using TransactionScope).
- While updating database the transaction gets rollback.
- So again I call the same method to update the database since it got rollback but I get the above error.
- After this all the calls to the methods throws the same error for certain period of time.

Our Investigation:
1. To make sure the transactions are disposed we are making all our database calls in "Using" statement & also explicitly disposing it off using Dispose method.

2. When we change the ConnectionString parameter "Pooling" to false then it works fine without any errors. But setting the "Pooling" property to true throws the above exception after a rollback.

3. We are also using the "Validate Connection" parameter to validate a connection.

4. One more thing is that if we change the "Min Pool Size" value from 0 to something else say 20 then we get the above error at a later stage after rollback & not immediately.

Would like to know how we can troubleshoot this or its the issue with dotConnect for MySql.

Thanks for help.

Devart Team
Posts: 2192
Joined: Wed 02 Nov 2011 09:44

Re: Transaction not getting disposed error

Post by Pinturiccio » Fri 13 Nov 2015 14:58

We have answered you via e-mail.

Post Reply