The IfxDriver that you have configured should generate instances of the expected IfxConnection. So where do the OdbcConnection come from? Are you creating connections yourself?
/Oskar 2013/2/11 Alexander De Mulder <[email protected]>: > csharp, spring.net 2.0.0, hhibernate 3.3.1/3.3.2/3.3.3 rc1 > > <db:provider id="DbProvider" > provider="IfxOdbc" > connectionString="Dsn=${db.dsn};Host=${db.host};Server=${db.server};Service=${db.service};Database=${db.database};UID=${db.user};Password=${db.password};"/> > > <property name="HibernateProperties"> > <dictionary> > <entry key="hibernate.connection.provider" > value="NHibernate.Connection.DriverConnectionProvider"/> > <entry key="dialect" > value="NHibernate.Dialect.InformixDialect1000"/> > <entry key="connection.driver_class" > value="NHibernate.Driver.IfxDriver"/> > <entry key="show_sql" value="true" /> > </dictionary> > </property> > > 'Errors' node cannot be resolved for the specified context > [System.InvalidCastException: Kan een object van het type > System.Data.Odbc.OdbcConnection niet converteren naar het type > IBM.Data.Informix.IfxConnection. > bij > IBM.Data.Informix.IfxCommand.System.Data.IDbCommand.set_Connection(IDbConnection > value) > bij NHibernate.AdoNet.AbstractBatcher.Prepare(IDbCommand cmd) in > p:\nhibernate-core\src\NHibernate\AdoNet\AbstractBatcher.cs:regel 112 > bij NHibernate.AdoNet.AbstractBatcher.ExecuteReader(IDbCommand cmd) in > p:\nhibernate-core\src\NHibernate\AdoNet\AbstractBatcher.cs:regel 217 > bij NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean > autoDiscoverTypes, Boolean callable, RowSelection selection, > ISessionImplementor session) in > p:\nhibernate-core\src\NHibernate\Loader\Loader.cs:regel 1226 > bij NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, > QueryParameters queryParameters, Boolean returnProxies) in > p:\nhibernate-core\src\NHibernate\Loader\Loader.cs:regel 421 > bij > NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor > session, QueryParameters queryParameters, Boolean returnProxies) in > p:\nhibernate-core\src\NHibernate\Loader\Loader.cs:regel 251 > bij NHibernate.Loader.Loader.DoList(ISessionImplementor session, > QueryParameters queryParameters) in > p:\nhibernate-core\src\NHibernate\Loader\Loader.cs:regel 1564]. > > translated: Cannot convert object of System.Data.Odbc.OdbcConnection to > IBM.Data.Informix.IfxConnection when retrieving data. > > Accessing the database using ifxcommand, ifxdatadapter works. > > Ibm informix 3.70.FC5DE client sdk > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/nhusers?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
