The mi_lo_ptr_cmp() function
The mi_lo_ptr_cmp() function compares two LO handles to determine if they reference the same smart large object.
Syntax
mi_integer mi_lo_ptr_cmp(conn, LO_hdl1, LO_hdl2)
MI_CONNECTION *conn;
MI_LO_HANDLE *LO_hdl1;
MI_LO_HANDLE *LO_hdl2;
- 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_hdl1
- A pointer to the first LO handle.
- LO_hdl2
- A pointer to the second LO handle.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
A byte-wise comparison of the two LO handles is not sufficient to determine equivalence. For example, a given smart large object might be referenced in two tables. However, if column-specific information is part of the LO handle, the two LO handles reference the same smart large object but are not equivalent because the column-level information is different.
Server only: The mi_lo_ptr_cmp() function
does not need a connection descriptor to execute. If your UDR does
not need a valid connection for other operations, you can specify
a NULL-valued pointer for the conn parameter to establish a
NULL connection. For information about the advantages of a NULL connection,
see the Informix®
DataBlade® API Programmer's Guide.
Return values
- 0
- The two LO handles, LO_hdl1 and LO_hdl2, reference the same smart large object.
- 1
- The two LO handles, LO_hdl1 and LO_hdl2, reference different smart large objects.
- MI_ERROR
- The function was not successful; arguments might be invalid.