informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_value_by_name()

The mi_value_by_name() function retrieves a column value from a row, given the column name.

Syntax

Usage

The mi_value_by_name() function returns the value for the column that the column_name column name specifies. It retrieves this column value from the row structure that row references. The only difference between mi_value_by_name() and mi_value() is that the former accesses a column by its name while the latter accesses it by column identifier. Like mi_value(), the mi_value_by_name() function is typically called in a loop that terminates when mi_value_by_name() has retrieved values for all the columns in the row. For more information about how to get a value from a column, see the description of mi_value().

Return Values

MI_NORMAL_VALUE indicates that the retbuf value is not a row type or a collection. The mi_value_by_name() function places the value in retbuf.
MI_COLLECTION_VALUE

indicates that the retbuf value is a pointer to a structure (MI_COLLECTION).

MI_ROW_VALUE indicates that the retbuf value is a pointer to a row structure (MI_ROW).
MI_NULL_VALUE indicates that the retbuf value is a NULL value.
MI_ERROR indicates that the function was not successful.

Related Topics

See the descriptions of the following functions: mi_collection_fetch(), mi_next_row(), mi_save_set_insert(), and mi_value().

For more information about how to retrieve values, see Obtaining Column Values.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved