Informix Error -1817: No collection or row variable provided.
Cause and resolution
No collection or row variable provided.
A collection or row host variable was expected but none was provided, or the host variable used in the derived table syntax is not a collection or row host variable.
Check the declaration of this host variable in the application and change it to a collection or row host variable declaration.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1817 fires when a collection or row host variable was expected but none was provided, or the host variable used in derived-table syntax isn't actually a collection/row host variable — per the official guidance, this is a declaration mismatch.
- No host variable provided at all, where a collection/row was expected, per the official guidance — the first named cause.
- A host variable provided that isn't declared as a collection/row type, per the official guidance's derived-table-syntax case.
Solutions / Resolution
- Check the declaration of this host variable in the application, per the official guidance, and change it to a collection or row host variable declaration.
Examples
A non-collection variable used in derived-table syntax
int order_id;
EXEC SQL SELECT * FROM TABLE(:order_id) AS t;
-- -1817: order_id is not a collection/row host variable
Corrected
collection *order_items;
EXEC SQL SELECT * FROM TABLE(:order_items) AS t;
Diagnostic Checks
- Check the declaration of the host variable used in the failing statement, confirming it's actually a collection or row type.
Related Errors / Related Topics
- -1814 — "Need to allocate collection or row variable before using it." A related complex-type error, about a missing allocation on a correctly-declared variable.
- -1815 — "No type information for collection or row is available." A related complex-type error, about a missing type declaration.
No collection/row host variable was provided, or the wrong kind of variable was used — check and correct its declaration.