Progress/SQL and Progress/ESQL
Progress/ESQL allows you to access most Progress/SQL syntax. This includes all ANSI standard elements, but excludes some Progress/SQL extensions to the ANSI standard. Progress/ESQL also includes additional elements to specify SQL requests from a C program according to the ANSI standard. For more information on Progress/SQL, see the Progress SQL-89 Guide and Reference . For ESQL standard information, see a copy of the ANSI Standard X3.135-1989 Level 2 . For information on how Progress/ESQL supports and extends the ANSI standard, see "Progress ESQL and ANSI Standards."
Progress/ESQL is a mechanism to specify SQL statements directly in your host language program. SQL statements in Progress/SQL procedures are called interactive SQL. You enter procedures that contain Progress statements using the Procedure Editor .Progress/ESQL provides an alternative to tools such as the Procedure Editor, for specifying Progress/SQL statements to Progress.
When you enter and execute Progress/SQL from the Procedure Editor, you are using a form of SQL that integrates well with Progress 4GL procedures. When you embed Progress/SQL in a host language program, you use Progress/ESQL (and ESQL-LIB) to provide a bridge between the host language environment and the Progress environment. Progress/ESQL uses a form of Progress/SQL similar to the form in the Progress 4GL.
When you specify a Progress/SQL statement using static ESQL, you replace the Progress statement period terminator (.) with the C language semicolon terminator (;). Also, wherever a Progress variable appears in Progress/SQL, you must use an ESQL-declared host language variable prefixed with a colon (:) in Progress/ESQL.
Certain Progress extensions to SQL are not available in Progress/ESQL. For example, you cannot specify a SELECT statement using the WITH option to access Progress I/O functionality. All SELECT statements in ESQL must either be cursor SELECT statements or singleton SELECT statements that return values to host language variables.
You can reference columns and host language variables only by name. You cannot use most Format Phrase options or array subrange expressions ( variable [ expression [ FOR n ] ]) that apply to columns and variables in Progress/SQL. However, you can use the COLUMN-LABEL, LABEL, and FORMAT options, especially in the CREATE TABLE statement. You can also qualify both table and column names for multiple schemas (databases).
For more information on Progress SQL, see the Progress SQL-89 Guide and Reference .
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |