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

mi_lo_close()

The mi_lo_close() function closes an open smart large object.

Syntax

Usage

The mi_lo_close() function closes the smart large object that is associated with the LO file descriptor, LO_fd. A call to the mi_lo_open(), mi_lo_copy(), mi_lo_create(), mi_lo_expand(), or mi_lo_from_file() function returns an LO file descriptor for a smart large object when it successfully opens it. The mi_lo_close() function deallocates the LO file descriptor so that it can be reused for another smart large object. Any open smart large objects that you do not explicitly close are automatically closed when the session ends (when the client connection terminates or the server routine completes).

When the mi_lo_close() function closes a smart large object, the database server attempts to unlock a locked smart large object if it has a share-mode or update-mode lock. For exclusive locks, the database server does not permit the release of the lock until the end of the transaction.

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

Return Values

MI_OK

The function was successful.

MI_ERROR

The function was not successful. The session is bad, or an argument is invalid.

Related Topics

See the descriptions of the following functions: mi_lo_copy(), mi_lo_create(), mi_lo_expand(), mi_lo_from_file(), and mi_lo_open().

In Chapter 3, "Handling Smart Large Objects," see "Smart-Large-Object Locks" and "Closing a Smart Large Object".




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