When you changed some of the values from int to string did you
accidently change StoreId to string as well?

Can you attach your HBM xml file or fluent code?

Can you attach your entity that has all the virtual fields assigned?

Also, why are you trying to connect to lotus notes in the first place
(didn't think people still used that, joking :-) )?  Is this a
continuous data pull your doing, describe your scenario as this seems
like one of those cases where it might be better to not use nHibernate
and do some other type of integration such as SSIS (sql server
integration services).

On Aug 26, 10:38 am, Koen Verheyen <[email protected]> wrote:
> 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