Problème TransactionScope !
Bonjour à tous !
J'essaye de tester les TransactionScope et j'ai une erreur que je n'arrive pas à régler...
Voici mon code :
Code:
1 2 3 4 5 6 7 8 9
| using (TransactionScope t = new TransactionScope())
{
Database d = DatabaseFactory.CreateDatabase();
DbCommand c = d.GetSqlStringCommand("INSERT INTO privileges(alias) VALUES('plop')");
d.ExecuteNonQuery(c);
DbCommand c2 = d.GetSqlStringCommand("INSERT INTO privileges(alias)VALUES('plop2')");
d.ExecuteNonQuery(c2);
t.Complete();
} |
Sur le premier d.ExecuteNonQuery(c), j'obtiens l'erreur suivante :
Citation:
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 'c02dab7b-d702-6454-b6be-33cfcec6a44e,-836f-6c9da2149e1a'' at line 1
Quelqu'un a une idée ? 8O