Progress
Embedded SQL-92
Guide and Reference
Embedding SQL-92 Statements in a C Language Program
SQL is a non-procedural language that uses statements to define, manipulate, and control data in a relational database. The Progress SQL-92 application development environment allows development of applications using the Embedded SQL tool. ESQL allows you to embed SQL-92 statements in the widely used C programming language. In this context, the C Language is referred to as the host language. Embedding SQL statements in a host language allows for development of applications that are more powerful and flexible than applications developed in either the host language or SQL alone. The Progress embedded SQL-92 interface in C is referred to as ESQLC.
C Language compilers do not recognize SQL statements and ESQL application programs containing SQL statements. It is necessary to translate these statements to the equivalent C Language code to build the program executable. The ESQL precompiler performs this translation.
To facilitate recognition of the statements the ESQL precompiler is to process, you begin the statements with the prefix EXEC SQL. These prefixed statements are referred to as ESQL constructs. The ESQL constructs are outlined in following sections.
NOTE: See "ESQL-92 Program Structure," for a complete description of each ESQL construct.EXAMPLEThe following code fragment is an overview of how SQL statements can be embedded in C:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |