eSQL Samples

Here are some samples on how to program for eSQL as well as a sample database animal.db. You can download the separate sample package here. All samples are installed to the C:\Program Files\Vieka\eSQL\Samples directory by default.

eSQL Sample Database

A sample database animal.db is included in the package. The sample database can be installed into any folder just by simply copying the database file. A SQL script, animal.sql, creates the sample database and tables and populates the table with data.

Some of the samples rely on sample data provided in the C:\Program Files\Vieka\eSQL\Samples\animal.db.

eSQL Standard ODBC Sample

isql is an interactive command line tool for standard SQL queries using ODBC. You can view the source code isql.c here.

To build the sample in Visual C++ 6.0:

  1. On the File menu, click Open Workspace.
  2. In the Files of type box, click Workspaces (*.dsw).
  3. Click the project file name.
  4. From the Tools menu, choose Options, and then click the Directories tab.
  5. From the Show directories for box, choose Include files and Library files, and ensure that the following directories are included and appear at the top of list:
  6. From the Build menu, choose Rebuild All.

eSQL.Net Sample

eSQL.Net is a Microsoft standard ADO.Net driver. Any standard ADO.Net programming can be readily applied to eSQL.Net. Here is a very good resource to get started with ADO.Net.

Here is the C# sample test.cs source code.

Here is the Visual Basic sample test.vb source code.

When building the sample for eSQL.Net, please add eSQLNet.dll to the project references.