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:
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:
..\..\..\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.