The mi_lo_specget_sbspace() function

The mi_lo_specget_sbspace() function obtains from an LO-specification structure the name of an sbspace where a smart large object is stored.

Syntax

mi_integer mi_lo_specget_sbspace(LO_spec, sbspace_name, length)
   MI_LO_SPEC *LO_spec;
   char *sbspace_name;
   mi_integer length;
LO_spec
A pointer to the LO-specification structure from which to obtain the sbspace name.
sbspace_name
A character buffer into which mi_lo_specget_sbspace() puts the name of the sbspace for the smart large object.
length
is an integer value that specifies the size, in bytes, of the sbspace_name buffer.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Yes

Usage

The mi_lo_specget_sbspace() function is the LO-specification accessor function that returns the sbspace name from a set of storage characteristics. The function copies up to (length-1) bytes into the sbspace_name buffer and ensures that it is null terminated. An sbspace name can be up to 18 characters long. However, you might want to allocate at least 129 bytes for the sbspace_name buffer to accommodate future increases in the length of an sbspace name.
Important: Before you call mi_lo_specget_sbspace(), you must put storage characteristics into an LO-specification structure.
You can use any of the following functions to initialize the LO-specification structure:
  • The mi_lo_colinfo_by_ids() or mi_lo_colinfo_by_name() function puts storage characteristics that are associated with a particular CLOB or BLOB column in an LO-specification structure.
  • The mi_lo_stat_cspec() function puts storage characteristics of an existing smart large object in an LO-specification.
  • The mi_lo_specget_sbspace() function sets the sbspace name in an LO-specification structure.

The mi_lo_specget_sbspace() function obtains the current value for the name of the sbspace from the LO-specification structure that LO_spec references.

For more information about the sbspace name of a smart large object or about how to use the mi_lo_specget_sbspace() function, see the HCL OneDB™ DataBlade® API Programmer's Guide.

Return values

MI_OK
The function was successful.
MI_ERROR
The function was not successful; the LO-specification structure might be invalid.