Contents Index Introduction Using host variables pdf/preface.pdf

UltraLite User's Guide
  The Embedded SQL Interface
    Introduction

Structure of embedded SQL programs


All embedded SQL statements start with the words EXEC SQL and end with a semicolon (;). Normal C-language comments are allowed in the middle of embedded SQL statements.

Every C program using embedded SQL must contain the following statement before any other embedded SQL statements in the source file.

EXEC SQL INCLUDE SQLCA;

The first embedded SQL executable statement executed in any program must be a CONNECT statement. If you are not including UltraLite user authentication in your application, this CONNECT statement is ignored.

For information about UltraLite user authentication in embedded SQL applications, see Managing user IDs and passwords, and User authentication for UltraLite databases.

Some embedded SQL commands do not generate any executable C code, or do not involve communication with the database. Only these commands are allowed before the CONNECT statement. Most notable are the INCLUDE statement and the WHENEVER statement for specifying error processing.


Contents Index Introduction Using host variables pdf/preface.pdf