Informix Error -6018: Tablename has not been opened.
Cause and resolution
Tablename has not been opened.
A call to dbselect must first open the table that dbadd() is to use. Review the program logic to make sure that this action is performed.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-6018 fires when dbadd() is called before dbselect() has opened its target table — per the
archived catalogue.
dbadd()called beforedbselect()opened the table, per the archived catalogue — the direct, only cause.
Solutions / Resolution
- Call
dbselect()to open the table before callingdbadd(), 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 thedbadd()call.
Related Errors / Related Topics
- -6006 — "Tablename has not been opened."
- -6008 — "Tablename has not been opened."
- -6015 — "Tablename has not been opened."
- -6021 — "Tablename has not been opened."
- -6023 — "Tablename has not been opened."
- -6028 — "Tablename has not been opened."
Open the table with dbselect() before calling dbadd().