Is there an ODBC connector for .NET Core that use iODBC when targeting linux instead of unixODBC?

105 views Asked by At

I'm currently building a API in ASP.NET that is supposed to extract large amount of data from HyperFileSQL (PCSOFT). While there is a linux ODBC Driver provided by PCSOFT for their DB system, it's build around iODBC and thus not compatible with System.Data.Odbc.

Do someone knows of an ODBC connector that can be configured or compiled to use iODBC instead of unixODBC when targeting linux ? Or of a way to use a driver built for iODBC with unixODBC ?

I tried using System.Data.Odbc but the driver is not found because it's looking for driver in unixODBC. Accessing the database with iodbctest in cmd is however functional.

1

There are 1 answers

2
TallTed On

Recent versions of iODBC should work with both drivers and applications built with the UnixODBC SDK as well as with the iODBC SDK.

It's not clear what you mean by "the driver is not found because it's looking for driver in unixODBC". My best guess is that you have multiple odbc.ini and odbcinst.ini files, and possibly both iODBC and UnixODBC driver managers installed, in different locations.

Unifying these -- i.e., blending the content of all odbc.ini and odbcinst.ini, respectively, and putting physical files at one location (e.g., /usr/local/) and symlinks at all other current locations -- and picking one set of driver manager libraries, and either deleting the others or making sure that the libraries you've chosen always come first when drilling through LD_LIBRARY_PATH ... may be all you need to do, to achieve your goal.