Mimer SQL Reference Manual TOC PREV NEXT INDEX

Mimer Developer Site

www.mimer.com/developer


EXECUTE


Associates parameter values with a previously prepared SQL statement and executes the statement.

Usage

Embedded.

Description

The prepared statement identified by the statement name is executed.

If the source form of the prepared statement contains parameter markers, the EXECUTE statement must be used with the USING clause and possibly also the INTO clause to correctly associate the statement parameters with an appropriate number of host variables or allocated SQL descriptor areas.

The DESCRIBE INPUT statement can be used to determine the PARAMETER_MODE of each of the parameters in the prepared statement.

If parameters are present with parameter mode IN or INOUT, the USING clause must be used to specify an SQL descriptor area or a list of host variables for these parameters. There must be one variable in the host variables list or referenced in the SQL descriptor area for each IN or INOUT parameter in the prepared statement. The variables are associated with the input parameter markers in a left to right manner as they appear in the prepared statement.

If parameters are present with parameter mode INOUT or OUT, the INTO clause must be used to specify an SQL descriptor area or a list of host variables for these parameters. There must be one variable in the host variables list or referenced in the SQL descriptor area for each INOUT or OUT parameter in the prepared statement. The variables are associated with the output parameter markers in a left to right manner as they appear in the prepared statement.

The data types of the variables must be compatible with their usage in the source statement.

The descriptor-name is identified by a host variable or a literal.

See ALLOCATE CURSOR for a description of extended statements.

For a fuller discussion of the use of EXECUTE statements in dynamic application programs, see the Mimer SQL Programmer's Manual.

Restrictions

The EXECUTE statement may only be used for dynamically prepared statements. Dynamically prepared SELECT statements may not be executed; these should be performed using a sequence of OPEN, FETCH and CLOSE statements.

Notes

When parameters with parameter mode INOUT are present, both a USING clause and an INTO clause is required. Each INOUT parameter must be associated with a variable in both the USING clause and the INTO clause.

The Mimer SQL Programmer's Manual contains information about the format of the host variable.

Standard Compliance

Standard
Compliance
Comments
X/Open-95
SQL92
YES
Fully compliant.



Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
dbtechnology@upright.se
Mimer SQL Reference Manual TOC PREV NEXT INDEX