The mi_streamwrite_lo() function
The mi_streamwrite_lo() function writes a smart large object to a stream, converting any difference in the internal representation to that of the stream representation.
Syntax
mi_integer mi_streamwrite_lo(strm_desc, LO_hdl_ptr)
MI_STREAM *strm_desc;
MI_LO_HANDLE *LO_hdl_ptr;
- strm_desc
- A pointer to the stream descriptor for the open stream to which to write the LO handle.
- LO_hdl_ptr
- A pointer to the LO handle to write to the stream.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_streamwrite_lo() function
writes the smart large object that LO_hdl_ptr references to
the stream that strm_desc 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.
Important: The mi_streamwrite_lo() function
requires the caller to have an open connection to the database server.
The mi_streamwrite_lo() function is useful in the streamwrite() support function of an opaque data type that contains a smart large object.
For more information about the use of mi_streamwrite_lo() in a streamwrite() support function, see the Informix® DataBlade® API Programmer's Guide.
Return values
- >=0
- The number of bytes that the function has written to the open stream.
- MI_STREAM_EEOF
- The end of the stream has been reached.
- MI_STREAM_EBADARG
- The stream descriptor that strm_desc references or the value that LO_hdl_ptr references is invalid.
- MI_ERROR
- The function was not successful.