Fujitsu J2X0-1634-01EN Computer Accessories User Manual


 
is shown below. For information about SQL statements used to manipulate the SQL descriptor area, see "Figure:
Procedure for setting dynamic parameter specification values for prepared statements."
Example:
This is an example of a dynamic single-row SELECT statement entered from a terminal. Data is
searched using the value of the dynamic parameter specification entered from the terminal as the
search condition.
7.3.3 Executing other prepared statements
If a dynamic parameter specification is specified to perform data manipulations such as inserting or updating data, use
an EXECUTE statement in which a USING clause is specified. The prepared statements that can be executed by an
EXECUTE statement are preparable statements other than dynamic SELECT statements. For more details on
statements that can be used for dynamic execution, see 7.1 "Overview of Dynamic SQL".
If the SQL statement variable contains an UPDATE statement (positioned) or a DELETE statement (positioned), the
corresponding cursor must be opened beforehand. Also, the specified cursor must be a dynamic cursor.
An example of specifying an UPDATE statement (searched) with a dynamic parameter follows. Refer to the example
in Figure: Example of an application program that uses the SQLDA structure (with dynamic parameter specification)
for details on SQL statements for manipulating the SQL descriptor area.
183