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

mi_lo_to_buffer()

The mi_lo_to_buffer() function copies a specified number of bytes from a smart large object to a user-defined buffer.

Syntax

Usage

The mi_lo_to_buffer() function copies up to size bytes from the smart large object that the LO_hdl LO handle references. The read operation from the smart large object starts at a zero-byte offset. This function allows you to read data from a smart large object without opening the smart large object.

If the smart large object is smaller than the size value, mi_lo_to_buffer() copies only the number of bytes in the smart large object. If the smart large object contains more than size bytes, the mi_lo_to_buffer() function copies only size bytes to the user-defined buffer.

When *buf_ptr points to NULL, mi_lo_to_buffer() allocates the memory for the buffer. Otherwise, the function assumes that you have allocated memory that buf_ptr references.

Return Values

>=0

The number of bytes copied from the smart large object to the user-defined buffer that buf_ptr references.

MI_ERROR

The function was not successful.

Related Topics

See the description of the mi_lo_from_buffer() function.




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