Command Line Shell

ooSQLite comes with a command line shell executable. ooSQLite3.exe on OS/2 and Windows, while oosqlite3 on Unix-like systems. This documentation will refer to the command line shell as ooSQLite3.exe as opposed to oosqlite3 because it is easy to distinguish that ooSQLite3.exe is an executable. In all cases, ooSQLite3.exe refers to both the Windows and Unix-like command line shell.

The command line shell is a simple program to use and will read any SQLite database file. It is extremely useful when first starting out with ooSQLite. Indeed, it is probably very useful at any time for anyone working with SQLite databases.

The executable is installed alongside the ooSQLite.cls file and the implementation library. The installation directory is normally added to the path, putting the command line shell also in the path. As long as it is in the path the command line shell can be executed from anywhere on the system.

Note that the ooSQLite command line shell is the same as the command line shell provided by SQLite. The shell source code is simply compiled as part of the ooSQLite build process and renamed. The source code is virtually unchanged, so ooSQLite3.exe behaves exactly the same as sqlite3.exe. At this time, the only change in ooSQLite3.exe is a few of the startup defaults.

Typically a command line shell is started up and presents some type of a prompt. The user then enters commands, the shell executes the command, and then returns to the prompt to await the next command. ooSQLite3.exe is no different. To start it type ooSQLite3, or oosqlite3 at a command prompt:
C:\\>ooSQLite3
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>
The .help command gives help on how to use the shell. Typically, the shell is started with the name of a database and the shell opens that database:
C:\\>ooSQLite3 phoneBook.rdbx
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
addr_type contacts inet_addr phone_addr street_addr
sqlite>
To exit the shell type .exit, or just .e
sqlite> .e
C:\\>

As noted, ooSQLite3.exe is the same as the sqlite3.exe command line shell that can be downloaded from SQLite . There is a wealth of information on the Internet regarding the SQLite command shell program. Anything said about sqlite3.exe applies to ooSQLite3.exe. Have fun with ooSQLite3.exe, it is an useful tool.