The mi_streamread_lo_by_lofd() function

The mi_streamread_lo_by_lofd() function reads smart-large-object data from a stream and copies the data to the open smart large object that a specified LO file descriptor identifies.

Syntax

mi_integer mi_streamread_lo_by_lofd(strm_desc, LO_fd)
   MI_STREAM *strm_desc;
   MI_LO_FD LO_fd;
strm_desc
A pointer to the stream descriptor for the open stream from which to read the smart-large-object data.
LO_fd
An LO file descriptor for an open smart large object.
Valid in client LIBMI application? Valid in user-defined routine?
No Yes

Usage

The mi_streamread_lo_by_lofd() function reads data from the open stream that strm_desc references and appends the data to the open smart large object that LO_fd references. This function does not close the smart large object or modify its reference count. The read operation begins at the current stream seek position. You can use mi_stream_tell() or mi_stream_getpos() to obtain this seek position.

This function is useful in the streamread() support function of an opaque data type that contains a smart large object.
Important: The mi_streamread_lo_by_lofd() function requires the caller to have an open connection to the database server.

For more information about the use of mi_streamread_lo_by_lofd() in a streamread() support function, see the HCL OneDB™ DataBlade® API Programmer's Guide.

Return values

>=0
The number of bytes that the function has read from the open stream to the smart large object.
MI_ERROR
The function was not successful.