Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# tdanz 9/17/2005 7:48 AM (edited 9/17/2005 7:50 AM)
If I want to add a new ARTICLE section to my page than I get the following error if I want to look at the page (the other modules seam to work):

Server Error in '/cuyahoga' Application.
--------------------------------------------------------------------------------

#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 'NULL' at line 1
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: 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 'NULL' at line 1

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[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 'NULL' at line 1]
MySql.Data.MySqlClient.PacketReader.CheckForError()
MySql.Data.MySqlClient.PacketReader.ReadHeader()
MySql.Data.MySqlClient.PacketReader.OpenPacket()
MySql.Data.MySqlClient.NativeDriver.ReadResult(Int64& affectedRows, Int64& lastInsertId)
MySql.Data.MySqlClient.CommandResult.ReadNextResult(Boolean isFirst)
MySql.Data.MySqlClient.CommandResult..ctor(Driver d, Boolean isBinary)
MySql.Data.MySqlClient.NativeDriver.SendQuery(Byte[] bytes, Int32 length, Boolean consume)
MySql.Data.MySqlClient.MySqlCommand.GetNextResultSet(MySqlDataReader reader)
MySql.Data.MySqlClient.MySqlDataReader.NextResult()
MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
MySql.Data.MySqlClient.MySqlCommand.System.Data.IDbCommand.ExecuteReader()
NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd)
NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session)
NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies)
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies)
NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes)
NHibernate.Hql.QueryTranslator.List(ISessionImplementor session, QueryParameters queryParameters)
NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters)

[ADOException: Could not execute query]
NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters)
NHibernate.Impl.QueryImpl.List()
Cuyahoga.Modules.Articles.ArticleModule.GetDisplayArticles(Int32 number)

[Exception: Unable to get Articles]
Cuyahoga.Modules.Articles.ArticleModule.GetDisplayArticles(Int32 number)
Cuyahoga.Modules.Articles.Articles.Page_Load(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()




any ideas?

cu
Thomas
# martijnb 9/18/2005 4:37 AM
Indeed, I got the same error with MySQL. It appears to be a bug in NHibernate 0.9.0 that was fixed in 0.9.1 (http://jira.nhibernate.org/browse/NH-348). Upgraded to NHibernate 0.9.1 and everything works fine again on MySQL :).

Btw, the SVN version might sometimes have issues with MySQL because I do development with MSDE or PostgreSQL and only test on MySQL with releases. This is also the reason why I hadn't experienced this bug yet.