ODBC - c-tree Plus Edition

Previous Topic

Next Topic

Building a FairCom Data Dictionary Script

The ODBC interface requires a minimum set of information, a data dictionary, to access data files. The data dictionary includes a list of the data files in each database. The c-tree ODBC Driver automatically creates the FairCom Data Dictionary on the first access to the Driver by an ODBC compliant application. The Driver looks for a simple text script in the Data Dictionary Path specified in the c-tree ODBC setup. For each data file the script should contain a line consisting of the alias_name, (the symbolic file name for the file), and the file_name, (the actual file name as it resides on the c‑tree Server machine hard drive). To simplify getting started, FairCom provides a sample script, FAIRCOM.DB, located in the c-tree ODBC Driver directory, C:\FAIRCOM\ODBC\32bit by default.

To adjust FAIRCOM.DB for use with the c‑tree Server, use a text editor to prefix the sample file names with the fully qualified path from the c‑tree Server perspective. For example: If you copied the files to the directory C:\fairserv in step 1, the script for the ODBC tutorial should look as follows:

CUSTOMERS C:\fairserv\custmast.dat

ORDERS C:\fairserv\custordr.dat

ORDER_DETAIL C:\fairserv\ordritem.dat

ITEMS C:\fairserv\itemmast.dat

The case sensitivity for the file and path names will be based on the requirements of the c‑tree Server host machine operating system. If your c‑tree Server is on a Unix-based operating system, use a forward slash, ‘/’, as a path separator instead of a back slash, ‘\’.

With a text script in place, such as FAIRCOM.DB, when the first ODBC compliant application accesses the c-tree ODBC Driver the data dictionary is created from the information in the text script.