Range of a lock

When you place a lock on a smart large object you can lock either the entire smart large object or you can lock a byte range. A byte range lock allows you to lock only the range of bytes that you will affect within the smart large object.

Two access-mode flags, LO_LoCKALL and LO_LOCKRANGE, enable you to designate the default type of lock that will be used for the smart large object. You can set them with ifx_lo_specset_flags() and retrieve them with ifx_specget_flags(). The LO_LOCKALL flag specifies that the entire smart large object will be locked; the LO_LOCKRANGE flag specifies that you will use byte-range locks for the smart large object. For more information, see The ifx_lo_specget_flags() function and The ifx_lo_specset_flags() function.

You can use the ifx_lo_alter() function to change the default range from one type to the other. You can also override the default range by setting either the LO_LOCKALL or the LO_LOCKRANGE flag in the access-mode flags for ifx_lo_open(). For more information, see Open a smart large object and The ifx_lo_open() function.

The ifx_lo_lock() function allows you to lock a range of bytes that you want to access for a smart large object and the ifx_lo_unlock() function allows you to unlock the bytes when you are finished. For more information, see The ifx_lo_lock() function and The ifx_lo_unlock() function.