Informix Error -2862
-2862 The table table-name cannot be found in the database.
All tables used in a form must exist at the time that the form is compiled, so that the compiler can verify the data types of the columns. The indicated table does not exist in the database that is named in the form. Check the spelling of the table name and database name. If they are as you intended, either you are not using the version of the database that you expected (check the value in the DBPATH environment variable), or the database has been changed.
The tables that are specified in the TABLES section of the form exist, but column-name, which is named in the ATTRIBUTES section, does not. Check its spelling against the actual table. Possibly the table was altered, or the column was renamed. You can use IBM Informix SQL to check column names under the Tables menu, Info selection.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2862 fires when a table named in a form specification doesn't exist in the database it's compiled against — per the official guidance, all tables used in a form must exist at compile time so the compiler can verify column data types.
- A misspelled table or database name, per the official guidance — the first named cause.
- Compiling against the wrong database version (check
DBPATH), per the official guidance — the second named cause. - The database was changed after the form was written, per the official guidance — the third named cause.
Solutions / Resolution
- Check the spelling of the table name and database name, per the official guidance.
- If they're as intended, check the
DBPATHenvironment variable to confirm which database version is actually being used, per the official guidance. - Otherwise, account for how the database has changed since the form was written, per the official guidance.
Examples
Checking DBPATH
echo $DBPATH
Checking whether the table exists
SELECT tabname FROM systables WHERE tabname = 'oders';
-- returns nothing if the name is genuinely wrong
Diagnostic Checks
- Check the table/database spelling, the
DBPATHsetting, and whether the table still exists in the target database.
Related Errors / Related Topics
- -2864 — "The table table-name is not among the specified tables." A related
table-reference error, about a table used but not declared in
TABLES, rather than one that doesn't exist in the database at all.
The named table doesn't exist in the database being compiled against — check spelling,
DBPATH, and whether the schema has changed.