INFORMIX
DataBlade API Programmer's Manual
Chapter 12: DataBlade API Function Descriptions
Home Contents Index Master Index New Book

mi_lo_readwithseek()

The mi_lo_readwithseek() function performs a seek operation and then reads a specified number of bytes of data from an open smart large object.

Syntax

Usage

The mi_lo_readwithseek() function reads nbytes of data from the open smart large object that the LO_fd file descriptor identifies. The read begins at the LO seek position of LO_fd that the offset and whence arguments indicate, as follows:

This offset value can be negative for all values of whence. The function reads this data into the user-allocated buffer that buf references. The buf buffer must be less than 2 gigabytes in size. To read smart large objects that are larger than 2 gigabytes, read them in 2-gigabyte chunks.

Tip: The mi_lo_readwithseek() function replaces the function mi_large_object_readwithseek(), which Informix supports for backward compatibility only. Use mi_lo_readwithseek() for all new DataBlade routines.

Return Values

>=0

The number of bytes that the function has read from the open smart large object to the buf character buffer.

MI_ERROR

The function was not successful.

Related Topics

See the descriptions of the following functions: mi_lo_read(), mi_lo_seek(), and mi_lo_writewithseek().

In Chapter 3, "Handling Smart Large Objects," see "Opening a Smart Large Object" and "Reading Data from a Smart Large Object".




DataBlade API Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.