|
ESQL/C is an SQL application programming interface (API) that enables you to embed Structured Query Language (SQL) statements directly into a C program. The ESQL/C preprocessor, esql, converts each SQL statement and all Informix-specific code to C-language source code and invokes the C compiler to compile it.
ESQL/C consists of the following software components:
For Windows environments, the ESQL/C product contains the following additional executable files:

These ESQL/C executable files are located in the %INFORMIXDIR%\bin, %INFORMIXDIR%\lib, and %INFORMIXDIR%\demo directories. The %INFORMIXDIR% variable represents the value of the INFORMIXDIR environment variable.
The ESQL/C library contains a set of C functions that you can use in your application. The library functions are described in Appendix B, ESQL/C Function Library. These functions fall into the following categories:

You create an ESQL/C program with the following steps:
An ESQL/C source file can contain the following types of statements:
For information on C preprocessor directives and C language statements, refer to a C programming text. This chapter provides an overview of embedded SQL statements (page 1-8), ESQL/C host variables (page 1-15), ESQL/C preprocessor directives (page 1-42), and ESQL/C header files (page 1-38).
Your ESQL/C source code filename can have either of the following forms:
The particular suffix that your ESQL/C source file has determines the default order in which that source file gets compiled by the esql command. The .ec suffix is the default suffix. For more information on the .ecp suffix and the non-default order of compilation, see Running the C Preprocessor Before the ESQL/C Preprocessor.