Connector version - 6.9.4 (I have tried with earlier version as well and the same exception was thrown)
Visual Studios 2008 , Windows XP SP3, MySQL Serve 5.6
I am getting error when I use TransactionScope. The code in TransactionScope works fine for the first time but when I try to perform the same operation on any other record while reading the it throws error.
The operation I am performing the copying records from 2 or more tables and copy as new records and want to make sure that while copying either records for all tables are insert or none (Commit or rollback).
Using the statement - using (TransactionScope scope = new TransactionScope())
Am I missing something ?? Are there any setting which needs to be done to use TransactionScope in MYSQL. The same code works fine after removing transactionscope.
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="MySql.Data"
StackTrace:
at MySql.Data.MySqlClient.NativeDriver.FetchDataRow(Int32 statementId, Int32 columns)
at MySql.Data.MySqlClient.Driver.FetchDataRow(Int32 statementId, Int32 columns)
at MySql.Data.MySqlClient.ResultSet.GetNextRow()
at MySql.Data.MySqlClient.ResultSet.NextRow(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlDataReader.Read()
Visual Studios 2008 , Windows XP SP3, MySQL Serve 5.6
I am getting error when I use TransactionScope. The code in TransactionScope works fine for the first time but when I try to perform the same operation on any other record while reading the it throws error.
The operation I am performing the copying records from 2 or more tables and copy as new records and want to make sure that while copying either records for all tables are insert or none (Commit or rollback).
Using the statement - using (TransactionScope scope = new TransactionScope())
Am I missing something ?? Are there any setting which needs to be done to use TransactionScope in MYSQL. The same code works fine after removing transactionscope.
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="MySql.Data"
StackTrace:
at MySql.Data.MySqlClient.NativeDriver.FetchDataRow(Int32 statementId, Int32 columns)
at MySql.Data.MySqlClient.Driver.FetchDataRow(Int32 statementId, Int32 columns)
at MySql.Data.MySqlClient.ResultSet.GetNextRow()
at MySql.Data.MySqlClient.ResultSet.NextRow(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlDataReader.Read()