1.5 Installation of ODBC interface on the target device

It is necessary to install the ODBC interface for the corresponding database system on target device on any operating system.

On Debian Linux, the rex-dbdrvt package automatically install and configure ODBC interface to be used with connection string mode for:

No more manual configuration is required. Following information about particular database system connection details is usually not needed.

1.5.1 Debian Linux – MySQL

The necessary packages are unixodbc and libmyodbc. Install them using:
sudo apt-get install unixodbc libmyodbc

Further it is necessary to append the following section to the /etc/odbcinst.ini file:

[MySQL]  
Description     = MySQL driver  
Driver          = libmyodbc.so  
Setup           = libodbcmyS.so

1.5.2 Debian Linux – Microsoft SQL (MSSQL)

The necessary packages are unixodbc and tdsodbc. Install them using:
sudo apt-get install unixodbc tdsodbc

Further it is necessary to append the following section to the /etc/odbcinst.ini file:

[MSSQL]  
Description     = Microsoft SQL driver  
Driver          = libtdsodbc.so  
Setup           = libtdsS.so

It is recommended to allways define PORT value in connection string with Microsoft SQL driver, because the default value can vary with ODBC adapter build configuration.

1.5.3 Debian Linux – Common ODBC DSN Configuration

Optionally, connection parameters can be stored under a specified name – a DSN – in the /etc/odbc.ini file:

[MyDSN]  
Driver       = MSSQL  
Description  = Microsoft SQL server - My great application  
SERVER       = sqlsrv.example.com  
PORT         = 1433  
Database     = MyDatabase

Then the connection-string have to be specified in form:
DSN=MyDSN;UID=username;PWD=password;.

Putting username and password into DSN configuration in /etc/odbc.ini is usually not supported (depends on database system driver).

1.5.4 Other platforms and database systems

Instructions on installing the ODBC driver on your platform should be included in the documentation of your database system (MySQL, PostgreSQL, Microsoft SQL etc.).