The SELECT statement can select an LO handle of a smart large object from a CLOB, BLOB, or opaque-type column. Because the desired result of a query is usually the contents of an object, not just its LO handle, the DataBlade API module must then use the LO handle that the mi_value( ) or mi_value_by_name( ) function returns to access the smart-large-object data in its sbspace.
For more information, see Binary and Text Representations of an LO Handle.
For more information on how to select smart large objects, see Accessing Smart Large Objects.
An LO handle is valid when it correctly identifies the location of a smart large object in an sbspace. An LO handle might be invalid for either of the following reasons:
Use the mi_lo_validate( ) function to check whether an LO handle is valid. If mi_lo_validate( ) returns a positive integer, the LO handle is invalid. You can mark this LO handle as invalid with the mi_lo_invalidate( ) function. The following code fragment checks whether the LO handle that LO_hdl references is valid:
if ( mi_lo_validate(conn, LO_hdl) > 0 ) mi_lo_invalidate(conn, LO_hdl);
You can use the mi_lo_validate( ) function in the support function of an opaque data type that contains smart large objects. In the lohandles( ) support function, this function can determine unambiguously which LO handles are valid for the given instance of the opaque type.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]