NHibernate GenericADOException could not execute query

This is a pretty common error which can be caused by a large number of reasons. I received the below error: GenericADOExcpetion could not execute query [ select ] [SQL: select ]


While I was implemented the TrueFalse NHibernate data type. What I did was in my class file (class.cs) I rightly created the property as a bool. However, wrongly set the type in my mapping file (class.hbm.xml) to boolean instead of TrueFalse.

Just in case you did not know, the NHibernate TrueFalse data type is a very cool data type because it lets you store T or F on the database but reference it as a bool within your code.

Nonetheless, the inner exception is:

  • {“Die Zeichenfolge wurde nicht als gültiger Boolean erkannt.”}
  • {“The string was not recognized as valid Boolean.”}