Describing Parameters
If an SQL statement is hard-coded in the application, then the application
writer already knows the type of each parameter. If an SQL statement is
constructed by the application at run time, the application can determine the metadata as
it builds the statement. For example, when the application constructs the
clause
The only situation in which the application cannot easily determine the
parameter metadata is when the user enters a parameterized statement. In this case,
the application calls SQLPrepare to prepare the statement, SQLNumParams to determine the number of parameters, and SQLDescribeParam to describe each parameter. However, as was noted earlier, most data sources
do not provide a way for the driver to discover parameter metadata, so SQLDescribeParam is not widely supported.