The Esql Sample

This sample consists of a command line SQL parser. SQL statements are filtered through a monitor and sent to the RDBMS.

Compiling

To compile the example:

Running

This sample lets you interact with your database through a console.

First you have to enter the database connection information:

Then you can enter standard SQL queries to interact with your database, for instance:

SQL> select firstname, lastname from CONTACTS where lastname = 'Smith'
John    Smith
SQL>

Note: enter exit to quit the application.

Under the Hood

This sample showcases the use of the 3 basic classes to interact with your database:

The whole sample code is contained in the root class: