How can I setup an ODBC data source for c-treeSQL on Linux?

Question ID : 305
Created on 2019-08-08 at 10:06 AM
Author : Veryant Support []

Online URL :

The unixODBC software allows to create ODBC data sources on Linux.
This software may not be installed on your system. Use a command like this to install it:

    sudo apt install unixodbc
Below we'll explain how to configure the c-tree ODBC driver and how to create and test a DSN on Linux.

Edit the file /etc/odbcinst.ini to define the driver, e.g.
    Description=ODBC for ctreeSQL
Note - The library is installed along with c-tree in the "driver/sql.odbc" subfolder.

Now that you have a driver, edit the file /etc/odbc.ini to create a DSN bind to this driver, e.g.
    Description=ctreeSQL data source
To allow the unixODBC install the odbcinst and odcini you must execute the following commands:
    odbcinst -i -d -f /etc/odbcinst.ini
    odbcinst -i -s -l -f /etc/odbc.ini 
You can test if your DSN is installed by executing:
    odbcinst -s -q
Expected result: [ctreeDSN] Please consider to set ODBCINI on environment variables, e.g.:
    export ODBCINI=/etc/odbc.ini
Now you can check if your unixODBC is configured for c-tree by running a tool connected to a unixODBC data source.
For example, you can execute the Interactive SQL (isql) from /usr/bin as shown below:
    isql ctreeDSN ADMIN ADMIN

Back to Original Question