The mi_lo_delete_immediate() function

The mi_lo_delete_immediate() function deletes a smart large object.

Syntax

mi_integer mi_lo_delete_immediate(conn, LO_hdl)
   MI_CONNECTION *conn;
   MI_LO_HANDLE *LO_hdl;
conn
This value is one of the following connection values:

A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().

A NULL-valued pointer (database server only)

LO_hdl
A pointer to the LO handle that identifies the smart large object to be deleted.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_lo_delete_immediate() function deletes the smart large object that the LO_hdl LO handle identifies. Normally, the database server deletes all smart large objects that have a reference count of zero and no open LO file descriptors at the end of the transaction. Therefore, you do not usually need to issue explicit delete calls. The mi_lo_delete_immediate() function is useful when you want to delete some transient smart large object right away and reuse its associated resources. This function can delete a transient smart large object only when no open LO file descriptors exist for the smart large object.

Server only: The mi_lo_delete_immediate() function does not need a connection descriptor to execute. If your UDR does not need a valid connection for other operations, you can specify a NULL-valued pointer for the conn parameter to establish a NULL connection. For information about the advantages of a NULL connection, see the HCL OneDB™ DataBlade® API Programmer's Guide.
The mi_lo_delete_immediate() function immediately deletes all the information related to the specified smart large object. After the call to mi_lo_delete_immediate(), all released resources can be reused, and any operations attempted on this smart large object fail.
Important: This mi_lo_delete_immediate() is not recoverable. Even if the transaction is rolled back, the deleted smart large object cannot be recreated.

Return values

MI_OK
The function was successful.
MI_ERROR
The function was not successful.