Previous Topic: Prepare the StatementNext Topic: Bind Input Parameters


Get Input Parameter Descriptions

The application can use the SQLNumParams function to determine the number of input parameters. This function does not require the driver to PREPARE the statement on the server.

The application can use the SQLDescribeParam function to determine the type and size of each input parameter. If the server is r12.0, the driver returns the "default parameter" description, usually VARCHAR. In this case, the driver does not need to PREPARE the statement on the server. If the server is r14.0 or later, the driver PREPAREs the statement on the server with the DESCRIBE INPUT option and returns the parameter description. This allows the application to get an accurate description of the parameter. However, it may result in an additional converse with the server for a query statement because the OPEN cannot be piggybacked onto the PREPARE until the statement is actually executed.