Informix Error -35213: No cursor declaration for procedure name.
Cause and resolution
No cursor declaration for procedure name.
The SQL statement requires a cursor id that was not declared in a DECLARE CURSOR statement. Check for misspellings, or add a DECLARE CURSOR statement for this cursor.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-35213 fires when an SQL statement requires a cursor id that was never declared — per the
official guidance, via a DECLARE CURSOR statement.
- A misspelled cursor id, per the official guidance — the first named possibility.
- A missing
DECLARE CURSORstatement for the cursor actually used, per the official guidance.
Solutions / Resolution
- Check for misspellings in the cursor id, per the official guidance, as the first step.
- Add a
DECLARE CURSORstatement for this cursor, per the official guidance, if one is genuinely missing.
Examples
N/A
No specific triggering statement is documented beyond a cursor id used without a matching
DECLARE CURSOR.
Diagnostic Checks
- Search the module for a
DECLARE CURSORmatching the cursor id named in the error. - Check for a misspelled cursor id between the declaration and the usage site.
Related Errors / Related Topics
- -35201 — "Cursor name must be an identifier." Another cursor-declaration error.
- -35203 — "Cursor cursor name already defined." The opposite problem: the same cursor id declared more than once.
- -35214 — "Cursor cursor name used with OPEN in more than one procedure." A related cursor-usage restriction.
- -35220 — "No OPEN procedure for cursor name." A related cursor-usage error, about a declared-but-unopened cursor rather than an undeclared one.
A cursor id was used without ever being declared — check for a misspelling first, then add the
missing DECLARE CURSOR statement.