Informix Error -6004: No database open.
Cause and resolution
No database open.
The program has called a function that requires a database to be open, but none is open. The program must call dbselect() before it calls this function.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-6004 fires when a function requiring an open database is called with none open — per the
archived catalogue, dbselect() must run first.
- A data-access function called with no database currently open, per the archived catalogue.
Solutions / Resolution
- Call
dbselect()to open a database before calling this function, per the archived catalogue.
Examples
N/A
No specific triggering statement is documented beyond the function-level condition described above.
Diagnostic Checks
- Confirm
dbselect()has succeeded before this call is reached.
Related Errors / Related Topics
- -6000 — "Tried to perform an operation on an unopened table or database. Database not yet opened."
- -6002 — "Tried to open more than one database."
Call dbselect() before any function that requires a database to already be open.