Fujitsu J2X0-1634-01EN Computer Accessories User Manual


 
7.3 Dynamically Modifying and Executing SQL Statement
Conditions
This section describes the following methods that can be used to dynamically modify and execute SQL statement
conditions.
· Manipulating the SQLDA structure
- Preparing and executing dynamic SELECT statements (for SQLDA structure)
- Preparing and executing dynamic single-row SELECT statements (for SQLDA structure)
· Manipulating the SQL descriptor area
- Preparing and executing dynamic SELECT statements (for SQL descriptor area)
- Preparing and executing dynamic single-row SELECT statements (for SQL descriptor area)
· Executing other prepared statements
· Executing prepared statements for which variable attributes are known
7.3.1 Manipulating the SQLDA structure
To manipulate data after only dynamically modifying the SQL statement conditions, use dynamic parameter
specifications. Store the values to be input in host variables. When the value of a host variable is set, the dynamic
parameter specification information must match the attributes of the host variable. Fetch dynamic parameter
specification information from the database to the SQLDA structure, modify the attributes, and specify the value. The
following figure shows the position of the SQLDA structure.
159