Hi, I am using NHibernate (build 1.0.0.0) with MySQL (version 5.0) to persist .NET v 2.0 objects but whenever I try to use the ITransaction object I get an exception (if I comment it out it works OK but obviously use of db transactions is important for real world apps). I am using VS2005 as my IDE. I have installed and referenced the MySQL ADO.Net driver (version 5.0 the one that supports .NET 2.0). NHibernate can connect to my db and there are no syntax errors in my table structure (else MySQL would not have created it). My mapping file seems OK (any errors and NHibernate would have raised an exception earlier).
Any help would be fantastic.
Cheers,
Katie
Here are the exception details:
09:57:34.396 [4972] ERROR NHibernate.Transaction.AdoTransaction - Begin transaction failed
MySql.Data.MySqlClient.MySqlException: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at MySql.Data.MySqlClient.MySqlConnection.BeginTransaction(IsolationLevel iso)
at MySql.Data.MySqlClient.MySqlConnection.BeginDbTransaction(IsolationLevel isolationLevel)
at System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction()
at NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
A first chance exception of type 'NHibernate.TransactionException' occurred in NHibernate.dll
|