The ifx_lo_read() function

The ifx_lo_read() function reads a specified number of bytes of data from an open smart large object.

Syntax

mint ifx_lo_read(LO_fd, buf, nbytes, error)
   mint LO_fd;
   char *buf;
   mint nbytes;
   mint *error;
LO_fd
The LO file descriptor for the smart large object from which to read.
buf
A pointer to a character buffer that contains the data that ifx_lo_read() reads from the smart large object.
nbytes
The size, in bytes, of the buf character buffer. This value cannot exceed 2 GB.
error
A pointer to a mint that contains the error code that ifx_lo_read() sets.

Usage

The ifx_lo_read() function reads nbytes of data from the open smart large object that the LO_fd file descriptor identifies. The read begins at the current seek position for LO_fd. You can use the ifx_lo_tell() function to obtain the current seek position.

The function reads this data into the user-defined buffer to which buf points. The buf buffer must be less than 2 GB in size. To read smart large objects that are larger than 2 GB, read them in 2-GB chunks.

Return codes

>=0
The number of bytes that the function has read from the smart large object into the buf character buffer.
-1
The function was not successful; examine the error for a detailed error code.