Progress
SQL-92
Guide and Reference
EXECUTE Statement
Executes the statement specified in statement_name. This is the syntax for an EXECUTE statement:
SYNTAX
statement_name
Name of the prepared SQL-92 statement.
structure_name
Name of an SQL-92 descriptor area (SQLDA).
EXAMPLEThis example is a code fragment from the
DynUpd
function in sample program3DynUpd.pc
, which illustrates dynamic processing of an UPDATE statement. The complete source for sample program,2StatSel.pc
, is listed in Appendix A of the Progress Embedded SQL-92 Guide and Reference .
NOTES
- A statement must be processed with a PREPARE statement before it can be processed with an EXECUTE statement.
- A prepared statement can be executed multiple times in the same transaction. Typically each call to the EXECUTE statement supplies a different set of host variables.
- If there is no DESCRIPTOR in the USING clause, the EXECUTE statement is restricted to the number of variables specified in the host variable list. The number and type of the variables must be known at compile time. The host variables must be declared in the DECLARE SECTION before they can be used in the USING clause of the EXECUTE statement.
- If there is a DESCRIPTOR in the USING clause, the program can allocate space for the input host variables at runtime.
AUTHORIZATION
(See AUTHORIZATION for the relevant statement)
SQL COMPLIANCE
SQL-92
ENVIRONMENT
Embedded SQL-92 only
RELATED STATEMENTS
EXECUTE IMMEDIATE Statement, PREPARE Statement, SQLCA structure
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |