Method 4: Query Statements With Parameters
Go Up to DSQL Programming Methods
There are four steps to processing a SQL query statement string with placeholder parameters:
- Prepare an input
XSQLDA
to process a statement string’s parameters. - Prepare an output
XSQLDA
to process the select-list items returned when the query is executed. - Prepare the statement string and its parameters.
- Use a cursor to execute the statement using input parameter values from an input
XSQLDA
, and to retrieve select-list items from the outputXSQLDA
.