Progress
SQL-92
Guide and Reference


EXEC SQL Delimiter

In C Language programs, you must precede embedded SQL-92 statements with the EXEC SQL delimiter so that the precompiler can distinguish statements from the host language statements.

NOTE: Constructs within a BEGIN-END DECLARE SECTION do not require the EXEC SQL delimiter.

SYNTAX

EXEC SQL sql_statement ; 

sql_statement

An SQL-92 statement to be processed by the ESQLC precompiler. You must terminate each SQL-92 statement with a semicolon to mark the end of the statement.

EXAMPLE

This example is a code fragment from the DynSel function in sample program 4DynSel.pc, which illustrates dynamic processing of a SELECT statement. The complete source for sample program, 2StatSel.pc, is listed in Appendix A of the Progress Embedded SQL-92 Guide and Reference .

EXEC SQL WHENEVER SQLERROR GOTO selerr ; 
EXEC SQL PREPARE stmtid from :sel_stmt_v ; 
EXEC SQL DECLARE dyncur CURSOR FOR stmtid ; 
EXEC SQL OPEN dyncur ; 
EXEC SQL WHENEVER NOT FOUND GOTO seldone ; 

NOTE

AUTHORIZATION

None

SQL COMPLIANCE

SQL-92

ENVIRONMENT

Embedded SQL-92 only

RELATED STATEMENTS

None


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095