The mi_lo_specset_flags() function

The mi_lo_specset_flags() function sets the attributes flag for a smart large object.

Syntax

mi_integer mi_lo_specset_flags(LO_spec, flags)
   MI_LO_SPEC *LO_spec;
   mi_integer flags;
LO_spec
A pointer to the LO-specification structure in which to save the flags value.
flags
An integer value for the bit mask of the attributes flag for the smart large object.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_lo_specset_flags() function is the LO-specification accessor function that sets the attributes flag for a new smart large object. The attributes flag provides the following information about a smart large object:
  • Whether to use logging on the smart large object
  • Whether to store the time of last access for the smart large object
Constants for these attributes are masked together into the single attributes-flag value. Therefore, to set a particular attribute, you must use the bitwise OR operator (|) to mask the attributes flag, as the following code fragment shows:
create_flags = MI_LO_ATTR_LOG | MI_LO_ATTR_KEEP_LASTACCESS_TIME
mi_lo_specset_flags(LO_spec, create_flags)
Important: Before you call mi_lo_specset_flags(), you must initialize an LO-specification structure.

When you set the attributes flag with mi_lo_specset_flags(), you override any column-level or system-specified attributes flag in the LO-specification structure. You then pass this LO-specification structure to a smart-large-object creation function (such as mi_lo_create()) to provide the attributes flag as a user-supplied storage characteristic for a new smart large object.

For more information about the attributes flag of a smart large object or about how to use the mi_lo_specset_flags() function, see the Informix® DataBlade® API Programmer's Guide.

Return values

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