SQLSetParam - Set parameter

Purpose

SQLSetParam() has been deprecated and replaced by SQLBindParameter(). Although this version of DB2® UDB CLI continues to support SQLSetParam(), it is recommended that you begin using SQLBindParameter() in your DB2UDB CLI programs so that they conform to the latest standards.

SQLSetParam() associates (binds) an application variable to a parameter marker in an SQL statement. When the statement is processed, the contents of the bound variables are sent to the database server. This function is also used to specify any required data conversion.

Syntax

SQLRETURN SQLSetParam (SQLHSTMT       hstmt,
                       SQLSMALLINT    ipar,
                       SQLSMALLINT    fCType,
                       SQLSMALLINT    fSqlType,
                       SQLINTEGER     cbParamDef,
                       SQLSMALLINT    ibScale,
                       SQLPOINTER     rgbValue,
                       SQLINTEGER     *pcbValue);