Method 4: Query Statements with Parameters (Embedded SQL Guide)
Go Up to DSQL Programming Methods (Embedded SQL Guide)
To process a SQL query statement string with placeholder parameters, there are four steps to follow:
- Preparing an input
XSQLDA
to process the parameters of a statement string. - Preparing an output
XSQLDA
to process the select-list items returned when the query is executed. - Preparing the statement string and its parameters.
- Using a cursor to execute the statement using input parameter values from an input
XSQLDA
, and to retrieve select-list items from the outputXSQLDA
.