Hitachi

Hitachi Advanced Database Application Development Guide


18.1.3 Flow of processing using dynamic parameters

When you execute a data manipulation SQL statement multiple times using different input values, the use of dynamic parameters can improve processing efficiency as compared to when you use the application program to create separate SQL statements, because repeated preprocessing of the SQL statements is eliminated.

You designate the use of a dynamic parameter by specifying ? at the location in the SQL statement where a value is to be passed from the application program. You use the a_rdb_SQLPrepare() CLI function to perform preprocessing. After that, you use the a_rdb_SQLBindParams() CLI function to set the dynamic parameter so that you can execute the SQL statement with the appropriate dynamic parameter value specified.

The following figure shows the flow of processing using dynamic parameters.

Figure 18‒3: Flow of processing using dynamic parameters

[Figure]

For details about dynamic parameters, see Variables (dynamic parameters) in the manual HADB SQL Reference.