The mi_lo_validate() function
The mi_lo_validate() function checks whether a given LO handle is valid.
Syntax
mi_integer mi_lo_validate(conn, LO_hdl)
MI_CONNECTION *conn;
MI_LO_HANDLE *LO_hdl;
- 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 the LO handle to validate.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
- The memory address is invalid or NULL.
- The LO handle contains invalid reference data because:
- It was never set to a valid value.
- It was explicitly invalidated with the mi_lo_invalidate() function.
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.
If mi_lo_validate() fails because of an invalid connection, callbacks are invoked.
Return values
- 0
- The LO handle that LO_hdl references is valid.
- >0
- The LO handle that LO_hdl references is invalid.
- MI_ERROR
- The connection was invalid.