Home | Previous Page | Next Page   Function Descriptions >

mi_lo_truncate( )

The mi_lo_truncate( ) function truncates a smart large object at a specified byte position.

Syntax

mi_integer mi_lo_truncate(conn, LO_fd, offset)
   MI_CONNECTION *conn;
   MI_LO_FD LO_fd;
   mi_int8 *offset;
conn
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_fd
is an LO file descriptor for the open smart large object whose value you want to truncate.
offset
is a pointer to the eight-byte integer (mi_int8) that identifies the offset at which the truncation of the smart large object begins.
Valid in Client LIBMI Application? Valid in User-Defined Routine?
Yes Yes

Usage

The mi_lo_truncate( ) function sets the last valid byte of a smart large object to the specified offset value. If this offset value is less than the current end of the smart large object, the database server reclaims all storage, from the position that offset indicates to the end of the smart large object.

Server Only

The mi_lo_truncate( ) 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 on the advantages of a NULL connection, see the IBM Informix: DataBlade API Programmer's Guide.

End of Server Only

Return Values

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

Related Topics

See also the description of mi_lo_open( ).

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]