Informix Error -6021: Tablename has not been opened.
Cause and resolution
Tablename has not been opened.
A call to dbselect must first open the table that dbdel() is to use. Review the program logic to make sure that this action is performed.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-6021 fires when dbdel() is called before dbselect() has opened its target table — per the
archived catalogue.
dbdel()called beforedbselect()opened the table, per the archived catalogue — the direct, only cause.
Solutions / Resolution
- Call
dbselect()to open the table before callingdbdel(), per the archived catalogue.
Examples
N/A
No specific triggering statement is documented beyond the function-level condition described above.
Diagnostic Checks
- Confirm
dbselect()precedes thedbdel()call.
Related Errors / Related Topics
- -6006 — "Tablename has not been opened."
- -6008 — "Tablename has not been opened."
- -6015 — "Tablename has not been opened."
- -6018 — "Tablename has not been opened."
- -6023 — "Tablename has not been opened."
- -6028 — "Tablename has not been opened."
Open the table with dbselect() before calling dbdel().