Informix Error -712
-712 Cannot insert encoded BLOB descriptor in non-optical BLOB columns.
You have attempted to use the DESCR() function to insert an encoded blob descriptor into a TEXT or BYTE column that is stored in a dbspace or blobspace. You can use this function only to insert descriptors into blob columns that are stored on optical media.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-712 fires when DESCR() is used to insert an encoded BLOB descriptor into a TEXT/BYTE
column stored in an ordinary dbspace/blobspace — per the official guidance, DESCR() can only
insert into BLOB columns stored on optical media, the same optical-vs-ordinary-storage
distinction as -638/-644.
DESCR()targeting aTEXT/BYTEcolumn stored in an ordinary storage space rather than on optical media, per the official guidance — the direct, only cause.- A column-naming mistake, targeting the wrong
TEXT/BYTEcolumn, one stored in an ordinary storage space rather than the intended optical one.
Solutions / Resolution
- Check that the target column is stored on optical media, per the official guidance, before
using
DESCR()to insert into it. - Confirm the column's storage space the same way as for -638:
combined with reviewing theSELECT colname FROM syscolumns WHERE tabid = (SELECT tabid FROM systables WHERE tabname = 'documents');CREATE TABLE's original storage-space clause for that column. - If the data genuinely needs to live in an ordinary storage space, don't use
DESCR()— insert the actual BLOB content directly instead of an encoded descriptor.
Examples
The disallowed attempt
-- content is TEXT, stored in an ordinary blobspace (not optical media)
INSERT INTO documents (doc_id, content) VALUES (1, DESCR('family1', 3, 'some description'));
-- -712: content isn't on optical media
Diagnostic Checks
- Review the target column's storage-space clause, confirming whether it's optical media or an ordinary storage space, the same check as -638.
Related Errors / Related Topics
- -638 — "Cannot cluster TEXT or BYTE columns on non-optical media." The same underlying
optical-vs-ordinary-storage distinction, in the
CREATE OPTICAL CLUSTERcontext. - -711 — "Cannot insert encoded BLOB descriptor." The more general
DESCR()-insert failure, of which this is a specific, named case.
The same optical-vs-ordinary-storage distinction as -638 — confirm the target column's actual
storage space before using DESCR().