Table of Contents Previous Next


7 Reference : 7.5 ECPGPlus Statements : 7.5.15 EXECUTE DESCRIPTOR

Use the EXECUTE statement to execute a statement previously prepared by an EXEC SQL PREPARE statement, using an SQL descriptor. The syntax is:
EXEC SQL [FOR array_size] EXECUTE statement_identifier
[USING [SQL] DESCRIPTOR
descriptor_name]
[INTO [SQL] DESCRIPTOR
descriptor_name];
array_size is an integer value or a host variable that contains an integer value that specifies the number of rows to be processed. If you omit the FOR clause, the statement is executed once for each member of the array.
statement_identifier specifies the identifier assigned to the statement with the EXEC SQL PREPARE statement.
Include the USING clause to specify values for any input parameters required by the prepared statement.
Include the INTO clause to specify a descriptor into which the EXECUTE statement will write the results returned by the prepared statement.
descriptor_name specifies the name of a descriptor (as a single-quoted string literal), or a host variable that contains the name of a descriptor.
The following example executes the prepared statement, give_raise, using the values contained in the descriptor stmtText:

7 Reference : 7.5 ECPGPlus Statements : 7.5.15 EXECUTE DESCRIPTOR

Table of Contents Previous Next