Contents Index Optimizing query operation SQLCA fields pdf/preface.pdf

UltraLite User's Guide
  The Embedded SQL Interface

The SQL Communication Area


The SQL Communication Area (SQLCA) is an area of memory that is used for communicating statistics and errors from the application to the database and back to the application. The SQLCA is used as a handle for the application-to-database communication link. It is passed explicitly to all database library functions that communicate with the database. It is implicitly passed in all embedded SQL statements.

A global SQLCA variable is defined in the generated code. The preprocessor generates an external reference for the global SQLCA variable. The external reference is named sqlca and is of type SQLCA. The actual global variable is declared in the imports library.

The SQLCA type is defined by the sqlca.h header file, which is located in the h subdirectory of your installation directory.

SQLCA provides error codes 

You reference the SQLCA to test for a particular error code. The sqlcode field contains an error code when a database request causes an error (see below). Some C macros are defined for referencing the sqlcode field and some other fields.


SQLCA fields
SQLCA management for multi-threaded or reentrant code
Using multiple SQLCAs

Contents Index Optimizing query operation SQLCA fields pdf/preface.pdf