BEGIN DECLARE SECTION

From InterBase

Go Up to Statement and Function Reference (Language Reference Guide)


Identifies the start of a host-language variable declaration section. Available in gpre.

BEGIN DECLARE SECTION;

Description: BEGIN DECLARE SECTION is used in embedded SQL applications to identify the start of host-language variable declarations for variables that will be used in subsequent SQL statements. BEGIN DECLARE SECTION is also a preprocessor directive that instructs gpre to declare SQLCODE automatically for the applications programmer.

Important:
BEGIN DECLARE SECTION must always appear within a module’s global variable declaration section.

Example: The following embedded SQL statements declare a section and a host-language variable:

EXEC SQL
BEGIN DECLARE SECTION;
BASED ON EMPLOYEE.SALARY salary;
EXEC SQL
END DECLARE SECTION;

See Also

Advance To: