Home | Previous Page | Next Page   Function Descriptions >

mi_streamwrite_row( )

The mi_streamwrite_row( ) function writes a row structure (row type) value to a stream, converting any difference in the internal representation to that of the stream representation.

Syntax

mi_integer mi_streamwrite_row(strm_desc, rowstruc_ptr, fparam_ptr)
   MI_STREAM *strm_desc;
   MI_ROW *rowstruc_ptr;
   MI_FPARAM *fparam_ptr;
strm_desc
is a pointer to the stream descriptor for the open stream to which to write the row structure (MI_ROW).
rowstruc_ptr
is a pointer to the row structure to write to the stream.
fparam_ptr
is a pointer to the MI_FPARAM structure for the user-defined routine that calls mi_streamwrite_row( ).
Valid in Client LIBMI Application? Valid in User-Defined Routine?
No Yes
Important:
Enterprise Replication does not support this function.

Usage

The mi_streamwrite_row( ) function writes a row structure to the stream that strm_desc references. The function writes the value that rowstruc_ptr references. The write operation begins at the current stream seek position. You can use mi_stream_tell( ) or mi_stream_getpos( ) to obtain this seek position.

The mi_streamwrite_row( ) function is useful in a streamwrite( ) support function of an opaque data type that contains a row structure (MI_ROW).

Important:
The mi_streamwrite_row( ) function requires the caller to have an open connection to the database server.

Return Values

>=0
is the actual number of bytes that the function has written to the open stream.
MI_STREAM_EEOF
indicates that the end of the stream has been reached.
MI_STREAM_EBADARG
indicates that the stream descriptor that strm_desc references or the value that rowstruc_ptr references is invalid.
MI_ERROR
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_stream_getpos( ), mi_stream_read( ), mi_stream_tell( ), and mi_streamread_row( ).

For more information on the use of mi_streamwrite_row( ) in a streamwrite( ) support function, see the IBM Informix: DataBlade API Programmer's Guide.

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