Informix Error -12051: Smart Large Objects: Smart large object was not opened for read.
Cause and resolution
Smart Large Objects: Smart large object was not opened for read.
You attempted to read a smart large object that was not open for reading.
Change the smart-large-object application program so that it opens the smart large object in read mode.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-12051 fires when a read is attempted on a smart large object not opened for reading — per the official guidance.
- The object opened without read mode, per the official guidance — the direct, only cause.
Solutions / Resolution
- Change the smart-large-object application program so it opens the object in read mode, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond a read on a non-read-mode object.
Diagnostic Checks
- Check the mode the smart large object was opened with, and confirm read mode is included before attempting a read.
Related Errors / Related Topics
- -12052 — "Smart Large Objects: Smart large object was not opened for write." The mirror-image error — a write attempted without write mode.
A read was attempted on a smart large object not opened for reading — open it in read mode.