Product Documentation

FairCom ISQL

Previous Topic

Next Topic

Command Line Execution Using Interactive SQL - Windows

FairCom provides a batch file (drivers\sql.cli\tutorials\cmdline\BuildTutorials.bat) which launches the four interactive SQL tutorials in sequence with a pause between every tutorial. This can be executed from the command line as follows:

  1. Open a Windows command shell.
  2. Change to the drivers\sql.cli\tutorials\cmdline\BuildTutorials.bat directory.
  3. Execute the following batch file: BuildTutorials.bat

The output of this tutorial should appear similar to the following:

INIT

DEFINE

Create table...

MANAGE

Delete records...

0 records deleted.

Add records...

1 record inserted.

1 record inserted.

1 record inserted.

1 record inserted.

Display records...

NUMBER NAME

------ ----

1000 Bryan Williams

1001 Michael Jordan

1002 Joshua Brown

1003 Keyon Dooling

4 records selected

Delete records...

4 records deleted.

DONE

Running the Tutorials "By Hand"

Note that the tutorials can also be run one by one “by hand” from the command line, from the parent folder, as follows:

  1. In the command shell, change to the drivers\sql.cli\tutorials folder.
  2. Execute each example as follows:

..\..\..\tools\isql -s iSQL_Tutorial1.sql -u admin -a ADMIN ctreeSQL

..\..\..\tools\isql -s iSQL_Tutorial2.sql -u admin -a ADMIN ctreeSQL

..\..\..\tools\isql -s iSQL_Tutorial3.sql -u admin -a ADMIN ctreeSQL

..\..\..\tools\isql -s iSQL_Tutorial4.sql -u admin -a ADMIN ctreeSQL

Note: Refer to the Interactive SQL Command-Line Interface user guide for all of the supported command-line switches.

Notice that tutorial #4 will throw four “Constraint violation” errors. This is expected and indicates correct behavior…

error(-20116): Constraint violation

NOTE: constraint violation expected

Troubleshooting

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

error in tcp bind 111
error(-20212): Error in Network Daemon

The most common cause of this error is that the FairCom Database Engine is not running on your machine. 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 Starting the FairCom Database Engine for details.

TOCIndex