Preparing the c-tree ODBC Driver for use with the c-tree Server involves the following simple steps:
Copy the data and index files from the FAIRCOM\ODBC\32bit\SAMPLE directory (or the directory name supplied during installation) to the desired location on the c-tree Server machine. For the initial install, we recommend putting the files in the c-tree Server directory.
Note: If the c-tree Server is installed on a High/Low platform (i.e., Unix or Apple) use the sample data found in the directory SAMPLE\HGHLOW.
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.
To continue the tutorial, modify the c-tree ODBC Driver Setup options to match the c-tree Server to be used:
The c-tree ODBC Setup dialog box contains the following prompts:
Data Source Name
Arbitrary name of the c-tree Driver.
Description
Arbitrary driver description.
Script Name
The script name should be FAIRCOM.DB for the tutorial.
Driver Type
The c-tree ODBC Driver makes it possible to select different operational modes for the Driver. The types are as follows:
Multi-User |
FairCom’s multi-user non-server (FPUTFGET) mode of operation. |
TCP/IP |
Communicate through the TCP/IP communication protocol to a c-tree Server. |
NETBIOS |
Communicate through the NETBIOS communication protocol to a c-tree Server. This protocol has been deprecated. |
SPX/IPX |
Communicate through the SPX/IPX communication protocol to a c-tree Server. |
Note: Select the proper communication protocol. If you are unsure which protocol to select, start with TCP/IP, which is the default for the c-tree Server, or contact your Server Administrator.
Server Name
Default: FAIRCOMS
The default c-tree Server name may be overridden with the SERVER_NAME keyword in ctsrvr.cfg, the Server configuration file located in the Server directory. If you are not sure of the name of your c-tree Server, contact your Server Administrator.
When using TCP/IP, the Server Name must include the host machine name. Both the Server Name and the host name are case sensitive. The format is as follows, where Server_Name is the name of the c-tree Server, and Server_Hostname is the name of the machine where the c-tree Server resides. If you are unsure about the host name, consult your network administrator:
Server_Name@Server_Hostname
For example, to connect to a machine with a host name of Sun and using the default Server Name, FAIRCOMS, specify the following in the ODBC Setup Server Name prompt: FAIRCOMS@Sun
Once the Server Name and other prompts are properly defined, click OK for the Setup and ODBC Data Source Administrator dialog boxes. To continue the tutorial, please proceed to “Tutorial.”