Transaction.Commit() failing
Posted: Tue 01 Nov 2005 08:38
Hi,
I'm migrating an existing app from Advantage to MySQL but i'm having trouble getting the transactions to work. For example my code might go like this
myCmd.Transaction = myCmd.Connection.BeginTransaction();
myCmd.ExecuteNonQuery();
...
...
myCmd.Transaction.Commit();
The problem is that the Commit() fails with exception 'System.NullReferenceException: Object reference is not set to an instance of an object'.
Code like this works fine with Advantage using the standard VS OLEDB components but not with MySQL and the CoreLab components.
I'm using v2.80 compoents and i've tried both v4.1 and v5.0 of MySQL with both MyISAM and INNODB tables.
Anyone any ideas???
Thanks
Dex
I'm migrating an existing app from Advantage to MySQL but i'm having trouble getting the transactions to work. For example my code might go like this
myCmd.Transaction = myCmd.Connection.BeginTransaction();
myCmd.ExecuteNonQuery();
...
...
myCmd.Transaction.Commit();
The problem is that the Commit() fails with exception 'System.NullReferenceException: Object reference is not set to an instance of an object'.
Code like this works fine with Advantage using the standard VS OLEDB components but not with MySQL and the CoreLab components.
I'm using v2.80 compoents and i've tried both v4.1 and v5.0 of MySQL with both MyISAM and INNODB tables.
Anyone any ideas???
Thanks
Dex