Examples

The examples, 1 through 8, describe Embedded SQL character-mode programs that are written using plain C, standard C libraries, and Embedded SQL statements. Each program connects to the specified SQL Server and executes a series of Embedded SQL statements.

Each program that is described in the following examples uses the appropriate EXAMPLEn.SQC, GCUTIL.C, GCUTIL.H, and QUICKWIN.DEF files. Some of these programs use the author2 table, which you can create by using the AUTHOR2.SQL file.

You can build an example program for the following environments by using the associated commands.

Environment

Command

Windows NT and Windows 95

makec examplen nt, where n is the number of the example program

MS-DOS

makec examplen dos, where n is the number of the example program

QuickWin

makec examplen qwin, where n is the number of the example program


Example 1

Example 2

Example 3

Example 4

Example 5

Example 6

Example 7

Example 8