Informix Error -12128: Smart Large Objects: Invalid offset in byte range lock / unlock call.
Cause and resolution
Smart Large Objects: Invalid offset in byte range lock / unlock call.
A call to one of the byte-range locking functions specifies an offset that is invalid:
* ESQL/C: ifx_lo_lock() or ifx_lo_unlock()
* DAPI: mi_lo_lock() or mi_lo_unlock()
An invalid offset means that the provided combination of (offset, whence) results in a negative value.
Use a valid (offset, whence) combination in the byte-range locking function.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-12128 fires when ifx_lo_lock()/ifx_lo_unlock() (ESQL/C) or mi_lo_lock()/
mi_lo_unlock() (DAPI) is called with an invalid offset — per the official guidance.
- An
(offset, whence)combination resolving to a negative value, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use a valid
(offset, whence)combination in the byte-range locking function, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond an offset/whence combination resolving negative.
Diagnostic Checks
- Check the
(offset, whence)combination, and confirm it doesn't resolve to a negative value.
Related Errors / Related Topics
- -12126 — "Smart Large Objects: LO is not opened for byte range locking." A related byte-range-locking error, on the object's lock mode rather than the offset.
- -12127 — "Smart Large Objects: Invalid range size in byte range lock / unlock call." A related byte-range-locking error, on the range size rather than the offset.
The byte-range lock/unlock call's (offset, whence) combination resolved to a negative
value — use a valid combination.