Informix Error -6040: The aliased table was not found as a table name in the database.
Cause and resolution
The aliased table was not found as a table name in the database.
The oldname parameter that was presented to dbalias() cannot be found in the current database as a tablename. Check the value of the parameter; if it is as you intended, then perhaps the wrong database is current, or the intended table has been renamed.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-6040 fires when dbalias()'s oldname parameter can't be found as a table name in the current
database — per the archived catalogue, this may mean the wrong database is current or the table
has been renamed.
- An incorrect
oldnamevalue, per the archived catalogue. - The wrong database currently selected, per the archived catalogue.
- The intended table having been renamed, per the archived catalogue.
Solutions / Resolution
- Check the value of
oldname. - Confirm the correct database is current.
- If the name is correct, check whether the table has been renamed.
Examples
N/A
No specific triggering statement is documented beyond the function-level condition described above.
Diagnostic Checks
- Confirm
oldnamenames an actual table in the current database.
Related Errors / Related Topics
- -6036 — "An aliasname is the same as an existing table name within the database."
- -6037 — "An aliasname has been used previously."
- -6038 — "An alias cannot be an alias of an existing alias."
oldname doesn't resolve to a real table — check spelling, the current database, and whether it's been renamed.