Hi,
I get an SQL error trying to create or retrieve data from my MS Access database. I'm using the new JetDialect, but can't find out what's wrong.
And on top of that I have problems finding the actual SQL statement sent to the database.
I have downloaded the source to NHibernate and tried to debug it all the way, but ends with a OleDbCommand that contains the cmdText for example as "INSERT INTO User_s (email, createtime, password, username, imagename) VALUES (?, ?, ?, ?, ?)" and the parameters separated. I have tried to manually execute the resulting statement directly on the database, but that works fine.
Then I tried enabling logging for NHibernate.SQL, but the closest I get to usable information is:
2005-12-14 18:52:30,866 [608] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Building an IDbCommand object for the SqlString: INSERT INTO User_s (email, createtime, password, username, imagename) VALUES (:email, :createtime, :password, :username, :imagename)
2005-12-14 18:52:30,866 [608] DEBUG NHibernate.Persister.EntityPersister [(null)] <(null)> - Dehydrating entity: [TheBrightSide.Powerpage.Business.Data.User#<null>]
2005-12-14 18:52:30,876 [608] DEBUG NHibernate.Type.StringType [(null)] <(null)> - binding 'TestEmail' to parameter: 0
2005-12-14 18:52:30,917 [608] DEBUG NHibernate.Type.DateTimeType [(null)] <(null)> - binding '14/12/2005' to parameter: 1
2005-12-14 18:52:30,917 [608] DEBUG NHibernate.Type.StringType [(null)] <(null)> - binding 'TestPassword' to parameter: 2
2005-12-14 18:52:30,917 [608] DEBUG NHibernate.Type.StringType [(null)] <(null)> - binding 'TestName' to parameter: 3
2005-12-14 18:52:30,917 [608] DEBUG NHibernate.Type.StringType [(null)] <(null)> - binding '' to parameter: 4
2005-12-14 18:52:30,927 [608] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO User_s (email, createtime, password, username, imagename) VALUES (?, ?, ?, ?, ?)
2005-12-14 18:52:30,927 [608] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO User_s (email, createtime, password, username, imagename) VALUES (?, ?, ?, ?, ?)
2005-12-14 18:57:20,563 [608] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDbCommand, open IDbCommands :0
2005-12-14 18:57:20,573 [608] DEBUG NHibernate.Util.ADOExceptionReporter [(null)] <(null)> - could not insert: [TheBrightSide.Powerpage.Business.Data.User]
System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement.
Again, not the actual actual SQL statement sent to the database. Isn't there some way to get that?
Or anyone knows what might be my problem?
Thanks in advance,
David
|