KI_BIND_PARAM

Bind a variable to a parameter in a query

Synopsis:
CALL KI_BIND_PARAM handle, col, bind_sym, [eBindType] TO status
status = 'ki_bind_param( handle, col, bind_sym, [eBindType] )
ArgumentEnumerationPurpose
handlePrepared query handle
colColumn number
bind_symSYM of the variable to be bound
eBindTypeKDB_BIND_ENUMOptional bind type
statusKDB_ERROR_ENUMReturn status
>KI_BIND_PARAM

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.

History
Introduced in KCML 5.02
See Also:
KI_BIND_COL, KI_BOUND_COL, KI_BOUND_PARAM, KI_COLUMNS, KI_DATABASES, KI_DEFAULT_ROW, KI_DESCRIBE_COL, KI_ERROR, KI_ERROR_TEXT, KI_EXECUTE, KI_FETCH, KI_GET_COL_LIST, KI_GET_ERROR_TEXT, KI_PARTITIONS, KI_PREFETCH_ROWS, KI_PREPARE, KI_SESSIONS, KI_SET_COL_LIST, KI_SQL, KI_SQL_XML, KI_TABLES, KI_TABLESPACES
KCML database status codes