Home | Previous Page | Next Page   Function Descriptions >

mi_parameter_type_name( )

The mi_parameter_type_name( ) function returns the data type name of the column that is associated with a specified input parameter in a prepared statement.

Syntax

mi_string *mi_parameter_type_name(stmt_desc, param_id)
   MI_STATEMENT *stmt_desc;
   mi_integer param_id;
stmt_desc
is a pointer to the statement descriptor for the prepared statement that contains the input parameter.
param_id
indicates 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 (0).
Valid in Client LIBMI Application? Valid in User-Defined Routine?
Yes Yes

Usage

The mi_parameter_type_name( ) function obtains the data type name of the column that is associated with param_id 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 names of input-parameter columns in the zero-based parameter-type name array. To obtain information about the nth input parameter, use a param_id value of n-1.

Parameter information is available only for the INSERT and UPDATE statements. Support for the UPDATE statement includes the following forms of UPDATE:

If you attempt to request parameter information for other SQL statements, mi_parameter_type_name( ) raises an exception.

Return Values

An mi_string pointer
is the name of the data type of the column that is associated with the specified input parameter.
NULL
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_close_statement( ), mi_exec_prepared_statement( ), mi_fetch_statement( ), mi_get_statement_row_desc( ), mi_parameter_count( ), mi_parameter_nullable( ), mi_parameter_precision( ), mi_parameter_scale( ), mi_parameter_type_id( ), mi_prepare( ), and mi_statement_command_name( ).

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]