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

mi_row_create()

The mi_row_create() creates a row, based a row descriptor and column data.

Syntax

Usage

The mi_row_create() function takes the column data that the col_values and col_nulls arrays hold and creates a row structure that holds this data, based on the column information in the row descriptor that row_desc references. It returns a pointer to the new row structure (MI_ROW) that it creates.

The mi_row_create() function is the constructor function for the row structure. This function uses the col_values and col_nulls arrays to obtain the column values that it copies into the new row structure. The col_values array holds the values for each column of the row. This array sends the column values as MI_DATUM values.

The mi_row_create() function allocates a new row structure with the PER_COMMAND memory duration. Values in the col_values array must be pass by reference or pass by value, depending on the data type of the value.

Values in the col_values array must be pass-by-reference for all data types.

The mi_row_create() function expects an mi_lvarchar variable-length structure as the coldata value for CHAR(n) and NCHAR(n) columns.

The mi_row_create() function puts copies of the col_values and col_nulls arrays into a row buffer that is associated with the row_desc row descriptor. If you call mi_row_create() twice with the same row descriptor, the second call overwrites the results of the first call.

Return Values

MI_ROW * is a pointer to the newly created row.
NULL indicates that the function was not successful.

Related Topics

See the descriptions of the following functions: mi_row_desc_create() and mi_row_free().

For more information, see Creating a Row Structure.


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