mi_integer mi_lo_alter(conn, LO_hdl, LO_spec) MI_CONNECTION *conn; MI_LO_HANDLE *LO_hdl; MI_LO_SPEC *LO_spec;
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)
Valid in Client LIBMI Application? | Valid in User-Defined Routine? |
---|---|
Yes | Yes |
The mi_lo_alter( ) function updates the storage characteristics of an existing smart large object with the characteristics in the LO-specification structure that LO_spec references. With mi_lo_alter( ), you can change only the following storage characteristics:
You can specify the MI_LO_ATTR_LOG or MI_LO_ATTR_NO_LOG constant for the attributes flag with the mi_lo_specget_flags( ) function.
You can specify the MI_LO_ATTR_KEEP_LASTACCESS_TIME or MI_LO_ATTR_NOKEEP_LASTACCESS_TIME constant for the attributes flag with the mi_lo_specget_flags( ) function.
You can store a new integer value for the allocation extent size with the mi_lo_specset_extsz( ) function. The new extent size applies only to extents written after the mi_lo_alter( ) function completes.
You can use mi_lo_alter( ) to alter the buffering mode of a smart large object that was created with light-weight I/O (MI_LO_NOBUFFER) to buffered I/O (MI_LO_BUFFER) as long as no open instances exist for that smart large object.
However, mi_lo_alter( ) generates an error if you attempt to change an open smart large object with buffered I/O to one with light-weight I/O.
The function obtains an exclusive lock for the entire smart large object before it proceeds with the update. It holds this lock until the update completes.
In a C UDR, the mi_lo_alter( ) 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.
See also the descriptions of mi_lo_spec_init( ), mi_lo_colinfo_by_name( ), and mi_lo_colinfo_by_ids( ).