TransactionScope not working with dotConnect for MySQL 5.50?

TransactionScope not working with dotConnect for MySQL 5.50?

Postby Sancha » Mon 22 Feb 2010 15:00

Hello every one !

I'm trying to use the TransactionScope class in my C# application.
Here's my code :
Code: Select all
using (TransactionScope t = new TransactionScope(TransactionScopeOption.RequiresNew))
            {
                MySqlConnection cn = new MySqlConnection();
                cn.ConnectionString = connectionString;
                cn.Open();
                MySqlCommand c = new MySqlCommand("INSERT INTO operateur.privileges(alias) VALUES('plop')", cn);
                c.ExecuteNonQuery();
                MySqlCommand c2 = new MySqlCommand("INSERT INTO operateur.privileges(alias) VALUES('plop2')", cn);
                c2.ExecuteNonQuery();
                t.Complete();
            }


On the cn.Open(), I get an error :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'XA BEGIN 'dc8e807b-222b-b3c4-e44c-a9be85f7dd88,-a9fb-cf5eb572459f'' at line 1

If I execute the same code not using the TransactionScope, it works perfectly...

Have you got an idea of what is the issue?

Thank you for helping me !
Sancha
 
Posts: 4
Joined: Tue 16 Feb 2010 16:02

Postby Shalex » Tue 23 Feb 2010 12:47

I have checked your code with the latest 5.70.97 version of dotConnect for MySQL. It works without errors. Please try 5.70.97 and notify us about the results. If the problem persists, post here your call stack.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Postby Sancha » Tue 23 Feb 2010 13:42

Thank you very much for your answer.
I have downloaded and installed the version 5.70 but, I have the same error...

I think is my MySql version...
Sancha
 
Posts: 4
Joined: Tue 16 Feb 2010 16:02

Postby Shalex » Wed 24 Feb 2010 08:21

Please specify the exact version (x.x.xx) of your MySQL Server and post here your connection string. Is your current build 5.70.97? You can find it in the Tools | MySQL | About menu of Visual Studio.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for MySQL