2. Allocate and fill an LO-status structure with the ifx_lo_stat() function
3. Use the appropriate ESQL/C accessor function to obtain the status information you need.
4. Deallocate the LO-status structure.
Accessing the LO-Status Structure The LO-status structure, ifx_lo_stat_t, stores the status information for a smart large object in an ESQL/C program. The locator.h header file defines the LO-status structure so you must include the locator.h file in your ESQL/C programs that access this structure.
Figure 7-7 Status Information in the LO-Status Structure Disk-Storage Information Description ESQL/C Accessor Functions Last access time The time, in seconds, that the smart large object was last accessed. This value is available only if the LO_KEEP_LASTACCESS_TIME flag is set for this smart large object. ifx_lo_stat_atime() Storage characteristics The storage characteristics for the smart large object. These characteristics are stored in an LO-specification structure (see page 7-7). Use the ESQL/C accessor functions for an LO-specification structure (see Figure 7-1 and Figure 7-2) to obtain this information. ifx_lo_stat_cspec() Last change in status The time, in seconds, of the last status change for the smart large object. A change in status includes updates, changes in ownership, and changes to the number of references. ifx_lo_stat_ctime() Last modification time (seconds) The time, in seconds, that the smart large object was last modified. ifx_lo_stat_mtime_sec() Reference count A count of the number of references to the smart large object. ifx_lo_stat_refcnt() Size The size, in bytes, of the smart large object. ifx_lo_stat_size() The time values (such as last access time and last change time) might differ slightly from the system time. This difference is due to the algorithm that the database server uses to obtain the time from the operating system. Deallocating the LO-Status Structure Once you have finished with an LO-status structure, deallocate the resources assigned to it with the ifx_lo_stat_free() function. When the resources are freed, they can be reallocated to other structures that your program needs. For more information on the ifx_lo_stat_free() function, see page 7-87.
Last access time
The time, in seconds, that the smart large object was last accessed.
This value is available only if the LO_KEEP_LASTACCESS_TIME flag is set for this smart large object.
ifx_lo_stat_atime()
Storage characteristics
The storage characteristics for the smart large object.
These characteristics are stored in an LO-specification structure (see page 7-7). Use the ESQL/C accessor functions for an LO-specification structure (see Figure 7-1 and Figure 7-2) to obtain this information.
ifx_lo_stat_cspec()
Last change in status
The time, in seconds, of the last status change for the smart large object.
A change in status includes updates, changes in ownership, and changes to the number of references.
ifx_lo_stat_ctime()
Last modification time (seconds)
The time, in seconds, that the smart large object was last modified.
ifx_lo_stat_mtime_sec()
Reference count
A count of the number of references to the smart large object.
ifx_lo_stat_refcnt()
Size
The size, in bytes, of the smart large object.
ifx_lo_stat_size()