How can I setup an ODBC data source for c-treeRTG on Linux?
You can use a generic ODBC manager library to connect to c-treeRTG, similar to how it is done in Windows.
One of the most common is the unixODBC library.
This software may not be installed on your system. Use a command like this to install it:
sudo apt install unixodbc
Here's how to configure the c-tree ODBC driver and create and test a DSN on Linux.
Define the c-tree driver: edit the file /etc/odbcinst.ini, e.g.
[ctreeDriver]
Driver=/path/to/libctodbc.so
Description=ODBC for c-treeRTG
FileUsage=1
Note - The libctodbc.so library is installed along with c-tree in the "drivers/ctree.drivers/lib" subfolder.
Create a DSN bound to this driver: edit the file /etc/odbc.ini, e.g.
Driver=ctreeDriver
Host=localhost
Database=ctreeSQL
Service=6597
Description=ctreeSQL data source
To allow the unixODBC library to install the odbcinst and odcini you must execute the following commands:
You can test if your DSN is installed by executing:
odbcinst -s -q
Expected result: [ctreeDSN]
Set the ODBCINI environment variable, e.g.
export ODBCINI=/etc/odbc.ini
Check that your unixODBC is configured for c-tree by running a tool connected to a unixODBC data source.
For example, you can execute unixODBC's Interactive SQL (isql) from /usr/bin as shown below:
isql -v ctreeDSN admin ADMIN
More information is given in the FairCom documentation here.
Authored
by: Veryant Support
This question has been viewed 3626 times so far.
Click
Here to View all the questions in c-treeRTG (SQL feature )
category.
File Attachments
There are no attachment file(s) related to this question.
User Comments
There are no user comments for this question. Be the first to post a comment. Click Here