The mi_parameter_type_id() function
The mi_parameter_type_id() function returns the type identifier of the column that is associated with the specified input parameter in a prepared statement.
Syntax
MI_TYPEID *mi_parameter_type_id(stmt_desc, param_id)
MI_STATEMENT *stmt_desc;
mi_integer param_id;
- stmt_desc
- A pointer to the statement descriptor for the prepared statement that contains the input parameter.
- param_id
- The parameter identifier of the column, which specifies the position of the input parameter in the specified statement descriptor. Input-parameter numbering follows C programming conventions: the first parameter in the statement is at position zero.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_parameter_type_id() function
obtains the type identifier for the column that is associated with param_id column
from the statement descriptor that stmt_desc references. This
function is an accessor function for a statement descriptor, which
describes a prepared statement. The statement descriptor stores information
about the type identifiers of input-parameter columns in the zero-based
parameter-type id array. To obtain information about the nth
input parameter, use a param_id value of n-1
.
- UPDATE with or without a WHERE clause
- UPDATE WHERE CURRENT OF
If you attempt to request parameter information for other SQL statements, mi_parameter_type_id() raises an exception.
For more information about input parameters or about type identifiers, see the Informix® DataBlade® API Programmer's Guide.
Return values
- An MI_TYPEID pointer
- A pointer to the type identifier of the column that is associated with the specified input parameter.
- NULL
- The function was not successful.