Product Documentation

FairCom ODBC

Previous Topic

Next Topic

Command-Line Compile - ODBC - Linux

The Linux builds of c-tree do not need a FairCom ODBC Driver to be installed like Windows does.

This section explains the steps to compile and run the c-tree DSQL tutorials from the Linux command line/command shell.

If the FairCom Database Engine is not already running on your machine, start the server. See Setting up the FairCom Database Engine.

Compiling

To compile the c-tree API tutorials from the Linux command line, follow these steps:

  1. CD into the proper folder:

    <faircom>\drivers/c.nav/tutorials/cmdline

  2. Execute make:

    >make

  3. If make works, it prints...

    The tutorials are ready to run.

    Type 'make run' to run the tutorials.

Running

Be sure the FairCom Database Engine is running.

To run the c-tree tutorials from the Linux command line, follow these steps from the same folder you compiled from:

  1. Type the following:

    >make run

  2. The make file will run the tutorial(s) one at a time.
  3. A prompt will ask you to press <Enter> after each tutorial is run.

If you see a c-tree error, you can look it up in the Error Code Reference.

See the Troubleshooting section below for solutions to common problems.

When running, the first tutorial should look similar to the following:

INIT

Logon to server...

DEFINE

Open table...

MANAGE

Delete records...

Add records...

Display records...

1000 Bryan Williams

1001 Michael Jordan

1002 Joshua Brown

1003 Keyon Dooling

DONE

Close table...

Logout...

Press <ENTER> key to exit...

See the Compile Using Microsoft Visual Studio IDE section for directions on how to use this tutorial.

Note: On systems running a glibc version older than 2.17, the tutorials need to be linked with librt by adding -lrt to the SYSLIBS macro in the makefile. If you are running a system with glbic older than 2.17, edit the makefile and uncomment -lrt.

Troubleshooting

This section lists some of the errors that can occur when compiling and running these tutorials:

error in tcp bind 10060

ctsqlConnect() - SQL ERROR: [-20212] - Error in Network Daemon

Perhaps your c-tree server is not running?

The most common cause of this runtime error is that the FairCom Database Engine is not running. Remember that the c-tree evaluation license times out after 3 hours, so the server might have exited and needs to be re-started. See Setting up the FairCom Database Engine for details.

TOCIndex