The mi_lo_utimes() function
The mi_lo_utimes() function enables you to set the last-access and last-modification time of a smart large object.
Syntax
mi_integer mi_lo_utimes(conn, LO_hdl, access_sec, access_usec, mod_sec,
mod_usec)
MI_CONNECTION *conn;
MI_LO_HANDLE *LO_hdl;
mi_integer access_sec;
mi_integer access_usec;
mi_integer mod_sec;
mi_integer mod_usec;
- conn
- This value is one of the following connection values:
A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
A NULL-valued pointer (database server only)
- LO_hdl
- A pointer to an LO handle that identifies the smart large object whose time is to be updated.
- access_sec
- An integer value that specifies the seconds component of the new last-access time. A value of zero tells the database server to set the last-access time to the current time.
- access_usec
- An integer value that specifies the microseconds component of
the new last-access time.
This parameter is not currently implemented and must be set to zero.
- mod_sec
- An integer value that specifies the seconds component of the new last-modification time. A value of zero for mod_sec and mod_usec tells the database server to set the seconds component of the last-modification time to the current time and the microsecond component of this time to zero.
- mod_usec
- An integer value that specifies the microseconds component of
the new last-modification time. A value of zero for mod_sec and mod_usec tells
the database server to set the seconds component of the last-modification
time to the current time and the microsecond component of this time
to zero.
The database server does not maintain the microsecond component of the last-modification time. You can use mi_lo_utimes() to maintain this value for your smart large object.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
The mi_lo_utimes() function updates the last-access and last-modification time of the smart large object that the LO_hdl LO handle identifies. The last-access time is the time that the smart large object was last accessed (last read or write operation). The last-modification time is the time that the smart large object was last modified (last write operation on user data of a smart large object).
The mi_lo_utimes() function performs an operation on a smart large object analogous to the operation that the UNIX™ or Linux™ touch command performs on an operating-system file. This function is valid on UNIX™, Linux™, and Windows™.
Updated time | Arguments for current system time | Arguments for specified system time |
---|---|---|
Last-access time | access_sec = 0, access_usec = 0 |
access_sec = specified number of seconds
since 00:00:00, January 1, 1970 access_usec = 0 You can update the last-access time even if the last-access time is not enabled as part of its storage characteristics of the smart large object. |
Last-modification time | mod_sec = 0, mod_usec = 0 |
mod_sec, = specified number of seconds since
00:00:00, January 1, 1970 mod_usec = specified number of microseconds (only if the platform supports the microsecond component of system time) |
For more information about the last-access time of a smart large object or about last-modification time of a smart large object, see the Informix® DataBlade® API Programmer's Guide.
Return values
- MI_OK
- The function was successful.
- MI_ERROR
- The function was not successful.