Using Host Language Variables
You use host language variables as storage to retrieve values from and insert values into SQL table columns, and to provide values for parameter markers in dynamic ESQL statements. Follow these rules when you use host language variables in ESQL:
- You must declare host language variables in an SQL Declare section before you reference them in other ESQL statements. ESQL uses this section to identify the variables and their data types for data conversion.
- In ESQL statement references, you prepend each host language variable name with a colon (:) and separate each host language variable specification from the next with a comma (,), as in this ESQL statement. For an example in context, see Step 4 of Figure 2–1 and Figure 2–2:
- Each host language variable specification can include an indicator variable to store NULL values. For more information, see the "Indicator Variables" section.
- You cannot specify host variables with C Language type definitions other than those defined in the ESQL header file (
proesql.h
) provided with your ESQL installation.- You must specify data types for host variables that are compatible with the SQL data types of their corresponding columns or parameter markers. For more information on the compatibilities between Progress/SQL and C data types, see "ESQL Data Type Compatibilities."
- You can use only scalar variables or character arrays (strings) as host language variables.
- You cannot use qualified or array-subscripted variables (that is, structure members or array elements) as host language variables.
- You cannot use C Language preprocessor constants (#define... constants) to declare or reference host variables.
- The Progress/ESQL C preprocessor does not support the following features of the new ANSI C standard:
- Trigraphs cannot occur anywhere in the source file.
- String continuations, indicated by quoted strings separated by white space, may not be used for string literals within the SQL-specific sections of a program. They may be used in the Progress 4GL code or in the non-SQL specific sections of the C code.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |