I have to import data from a Lotus Notes database via ODBC. The source
data are all varchar fields while some columns actually contain dates
and numbers. I mapped those colums with NHibernate to the appropriate
types which works for loading but not for comparing (using criteria,
e.g. Restrictions.Eq("StoreId", 123)).

Whenever I execute that I get the OdbcException: [Lotus][ODBC Lotus
Notes]Incompatible data types in comparison

If I use a string value in the comparison I get an NHibernate
QueryException: StoreId expected type System.Int32, actual type
System.String

I have tried the same scenario with a SQL Server 2005 database with
varchar columns through an ODBC connection and the comparison actually
works there.

NHibernate appears to send the value through an OdbcParameter because
there's a question mark in the generated SQL query. I use the
GenericDialect and NotesSQL ODBC driver version 3.02.

Who can help please?
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to