Connect via 64 bit odbc in Sybase database

Asked

Viewed 42 times

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?

  • It is not a desktop application, in windows.

  • And you set up the connection on ODBC 64bits?

  • I only left configured on ODBC 64bits, but when I give Publish does not connect the application.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.