Steps to reproduce
1) Create a table with 2 columns in mysql (id, name). Id is an autoincrement
2) Created new solution in VS2008,
3) Added a dataset to the solution
4) Added a tableadapter for the single table in mysql
5) Added th following code
Code: Select all
using (TransactionScope _scope = new TransactionScope())
{
DataSet2TableAdapters.alphaTableAdapter adapter = new MySQLTransactionScope.DataSet2TableAdapters.alphaTableAdapter();
adapter.InsertQuery("inside scope"+DateTime.Now.ToString());
}
When this code runs the following error occurs Devart.Data.MySql.MySqlException : XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state