SQLSetParam() - Bind a parameter marker to
a buffer
SQLSetParam() is a deprecated function
and is replaced with SQLBindParameter().
ODBC specifications for SQLSetParam()
| ODBC | X/OPEN CLI | ISO CLI |
|---|---|---|
| 1.0 (Deprecated) | Yes | No |
Example
Suppose that
a program contains the following statement:
rc = SQLSetParam(hstmt, 1, SQL_C_LONG, SQL_INTEGER,
0, 0, Prod_Num, NULL); To get the same result with SQLBindParameter(),
use this code: rc = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER,
0, 0, Prod_Num, 0, NULL);