Execute a parameterized SELECT that returns multiple rows
The following sample program described is a modified version
of the demo4.ec example program. It shows how
to use a dynamic SELECT statement with the following conditions:
- The SELECT returns more than row.
The SELECT must be associated with a cursor, executed with the OPEN statement, and have its return values retrieved with the FETCH...USING DESCRIPTOR statement.
- The SELECT has input parameters in its WHERE clause.
The OPEN statement includes the USING DESCRIPTOR clause to provide the parameter values in an sqlda structure.
- The SELECT has unknown columns in the select list.
The FETCH statement includes the USING DESCRIPTOR clause to store the return values in an sqlda structure.