0
I am trying to connect to a database via Odbc, and I use the driver System.Data.Odbc. In odbc 32-bit works already, in odbc 64-bit does not.
IDictionary<string, string> properties = new Dictionary<string, string>();
properties.Add("connection.driver_class", "NHibernate.Driver.OdbcDriver");
properties.Add("dialect", "NHibernate.Dialect.SybaseASA10Dialect");
properties.Add("proxyfactory.factory_class", "NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle");
properties.Add("hibernate.connection.provider", "NHibernate.Connection.DriverConnectionProvider");
properties.Add("connection.connection_string", "DSN=CONNECTION");
properties.Add("hbm2ddl.keywords", "none");
InPlaceConfigurationSource source = new InPlaceConfigurationSource();
source.Add(typeof(ActiveRecordBase), properties);
tipos = GetAllClasses().GetTypes();
ActiveRecordStarter.Initialize(source, tipos);
ISessionFactoryHolder holder = ActiveRecordMediator.GetSessionFactoryHolder();
_sessionFactory = holder.GetSessionFactory(typeof(ActiveRecordBase));
When I try to connect on 64-bit odbc I get return of the following error:
ERROR [IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified
You are running the project with IIS express?
– Bruno Warmling
It is not a desktop application, in windows.
– Max Naegele
And you set up the connection on ODBC 64bits?
– Bruno Warmling
I only left configured on ODBC 64bits, but when I give Publish does not connect the application.
– Max Naegele