Describing a Statement with Dynamic Runtime Parameters
If the prepared statement specifies a set of parameters whose cardinality
or data types must be supplied at runtime, you can describe these
input values. If the prepared statement text includes one of the following
statements, the DESCRIBE INPUT statement returns a description of
each column or expression that is included in the list:
- EXECUTE FUNCTION (or EXECUTE PROCEDURE)
- INSERT or SELECT
- UPDATE or DELETE
The description includes the following information:
- The data type of the column, as defined in the table
- The length of the column, in bytes
- The name of the column or expression
- Information about dynamic parameters (parameters that are expressed as question ( ? ) mark symbols within the prepared statement)
If the database server cannot infer the data type of an expression parameter, the DESCRIBE INPUT statement returns SQLUNKNOWN as the data type.
You can specify a destination for the returned information as a new or existing system-descriptor area, or as a pointer to an sqlda structure.