Hello, I have .NET 3.5 application wrote in C# using NHibernate.
Before I has OracleClientDriver in connection.driver_class property, that say that I use System.Data.Oracle and all works fine, but for some reasons now I need using ODP, so I changed this property to: NHibernate.Driver.OracleDataClientDriver.
When I run my code I get following error during Session Factory creation:
Unable to cast object of type 'Oracle.DataAccess.Client.OracleConnection' to type 'System.Data.Common.DbConnection'
After short searching in Inernet I found solution: to add:
<property name="hbm2ddl.keywords">none</property>
So now NHibernate successfully build Session Factory but fall in session.Flush() with following error:
System.ArgumentException: Value does not fall within the expected range
at Oracle.DataAccess.Client.OracleParameter.set_DbType(DbType value)
at NHibernate.Driver.DriverBase.InitializeParameter(IDbDataParameter dbParam, String name, SqlTypes sqlType)
Any ideas?
Thank you for ahead.
But this give me following