On Windows, the Easysoft ODBC-ODBC Bridge client uses the {Get|Set}PrivateProfileString
interface to save and retrieve DSN attributes. Therefore, all data sources should be set up with the ODBC Data Source Administrator.
On non-Windows platforms, the data sources are stored in a text file. The ODBC-ODBC Bridge client searches for this text file using the following order:
ODBCINI (environment variable) cwd odbc.ini cwd .odbc.ini (UNIX only, not VMS) home odbc.ini home .odbc.ini (UNIX only, not VMS) /etc/odbc.ini (SYS$ROOT:odbc.ini for VMS) - system DSNs only wherever unixODBC stores DSNs
where cwd is the current working directory and home is the current user's home directory (the HOME environment variable then the /etc/passwd entry on UNIX or SYS$LOGIN on OpenVMS).
If the ODBC-ODBC Bridge client cannot find the DSN in the fixed locations, it will attempt to load the unixODBC libodbcinst shared object and use SQLGetPrivateProfileString()
. In this way, if you built unixODBC yourself with a different --sysconfdir
, ODBC-ODBC Bridge can still find your DSNs.
The ODBC-ODBC Bridge server has no need to lookup DSNs or DSN attributes as it is acting as an application talking to either a Driver Manager or an ODBC driver directly (of course this changes when you are running the ODBC-ODBC Bridge Server on non-Windows machines).
If you are running Apache/PHP built with the ODBC-ODBC Bridge, Easysoft recommend you use /etc/odbc.ini because:
See Apache/PHP can't to find my odbc.ini file or Datasource not found and no default driver error.