KI_BIND_PARAM
Argument | Enumeration | Purpose |
---|---|---|
handle | Prepared query handle | |
col | Column number | |
bind_sym | SYM of the variable to be bound | |
eBindType | KDB_BIND_ENUM | Optional bind type |
status | KDB_ERROR_ENUM | Return status |
KI_BIND_PARAM
This function is used to bind a variable in a program to a parameter in an SQL statement associated with the handle handle. Parameters are numbered from 1 in the order they occur in the SQL. It can be issued at any time between the KI_PREPARE and the KI_EXECUTE call when the information is needed to build the result set.
Using parameters the same SQL statement can be reused without a new KI_PREPARE by simply changing the values of the bound parameter variables and reissuing the KI_EXECUTE. Passing a zero for the buffer will remove a parameter from the bound list.