Informix Error -12138: Smart Large Objects: Attempt to open an LO with light I/O and byte range locking.
Cause and resolution
Smart Large Objects: Attempt to open an LO with light I/O and byte range locking.
At open time, you specified an unsupported combination of options. Byte-range locking is not supported with light I/O. Check your program and remove one of the blob open flags (MI_LO_NOBUFFER flag or MI_LO_LOCKRANGE flag).
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-12138 fires when an open call combines light I/O with byte-range locking — per the official guidance.
MI_LO_NOBUFFERandMI_LO_LOCKRANGEboth set on the same open call, per the official guidance — the direct, only cause; byte-range locking isn't supported with light I/O.
Solutions / Resolution
- Remove one of the two open flags (
MI_LO_NOBUFFERorMI_LO_LOCKRANGE), per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond combining light I/O with byte-range locking.
Diagnostic Checks
- Check the open flags passed, and confirm
MI_LO_NOBUFFERandMI_LO_LOCKRANGEaren't both set.
Related Errors / Related Topics
- -12126 — "Smart Large Objects: LO is not opened for byte range locking." A related byte-range-locking error, about the wrong lock mode being set rather than an unsupported flag combination.
Light I/O and byte-range locking were combined on the same open call, which isn't supported — remove one of the two flags.