SQLNumParams can be called only after SQLPrepare has been called.
If the statement associated with StatementHandle does not contain parameters, SQLNumParams sets *ParameterCountPtr to 0.
The number of parameters returned by SQLNumParams is the same value as the SQL_DESC_COUNT field of the IPD.
For more information, see Describing Parameters.