JDB SQL Reference


Appendix B. JDB-Specific Error Messages

This chapter lists the error messages that can occur while using JDB. The messages are stored in the Panther message file.

If an error occurs using the isql utility, the error message is displayed on the screen. If the error prompt appears followed by numbers instead of error message text, check the setting of the variable SMVARS.

If an error occurs in an application, the message that appears on the screen depends on the type of error handler currently installed. There are DBMS commands and global variables available in Panther's database drivers for use in an error handler. For more information, refer to Chapter 37, "Processing Application Errors," in Application Development Guide.


Error Message Listing

Aggregate function not allowed in current context (DM_JDB_AGGREGATE_NOT_ALLOWED)

Cause:
Aggregate function appears in the wrong context.*

Action:
Aggregate functions can appear in the select list of a SELECT statement or in a HAVING clause.
Ambiguous column reference (DM_JDB_AMBIGUOUS_COLUMN_REF)

Cause:
In a multiple join, a column name has been specified without its corresponding table name.

Action:
Add the table name to the column references.
Bad Input (DM_JDB_BAD_INPUT)

Cause:
Data formatted incorrectly for tbldata utility.*

Action:
Edit input file. For information on data types, refer to page 6-15.
Corrupt JDB Database detected (DM_JDB_DB_CORRUPT)

Action:
Exit the database, restart that same database, and reissue the statement to see if the message disappears. If not, use tbldata to unload the database. Check the ASCII file before reloading the database.
Current cursor is not attached to a database (DM_JDB_NODB)

Cause:
Executing a query or data modification statement while connected to the system catalog or while not connected to a database.

Action:
Logon to the desired database, and re-execute the command.
Duplicate column assignment (DM_JDB_DUP_COL_ASSIGNMENT)

Cause:
The column has been specified twice in the SET clause of an UPDATE statement.

Action:
Edit statement and eliminate duplicate setting.
Duplicate column name (DM_JDB_DUP_CNAME)

Cause:
The column name has already been specified for that table.

Action:
Assign each column in the database table a unique name.
Duplicate table alias (DM_JDB_DUPTABLEALIAS)

Cause:
Using the same table alias for more than one table.

Action:
Assign each table alias a unique name.
Duplicate table name (DM_JDB_DUP_TNAME)

Cause:
Creating a database table that matches an existing table name.

Action:
Assign each table in the database a unique name.
File I/O Error (DM_JDB_FILE_IO_ERR)

Cause:
1.)Database is not in the current directory. 2) Database does not exist. 3) Database name was misspelled.

Action:
Depending on the desired outcome, either specify the database path or create the database in the current directory.
Internal datatype conversion failed (DM_JDB_CONVERSION_FAILED)

Cause:
Inserting a character string into a datetime column in an INSERT or UPDATE statement. Inserting a ; instead of a : when specifying a datetime value.

Action:
Check to see if the values match the data types of the columns.
Invalid Database/Table Handle (DM_JDB_BAD_HANDLE)

Cause:
Internal error in opening and closing table structure.*

Action:
Exit database and restart.
Invalid Table operation (DM_JDB_INVALID_TABLE_OP)

Cause:
Trying to update system tables.

Action:
Only SELECT statements can be used on the system tables.
Journal error (DM_JDB_JOURNAL_ERROR)

Cause:
Database is read-only.

Action:
Change the file permissions.
Key columns must be specified as not null (DM_JDB_KEY_MUST_BE_NULL)

Cause:
Primary key column was specified in the CREATE TABLE statement without the NOT NULL keywords.

Action:
Insert the NOT NULL keywords for primary key columns.
Maximum record length exceeded (DM_JDB_MAX_RECLEN_EXCEEDED)

Cause:
Row definition is greater than 1K.

Action:

Edit table definition to a maximum of 1024 bytes for each row.

More than one primary key was specified (DM_JDB_MULT_PKEY)

Cause:
An additional PRIMARY KEY clause was specified in the CREATE TABLE statement.

Action:
Specify one PRIMARY KEY clause using commas to separate the primary key columns.
Must close Database first (DM_JDB_DATABASE_OPEN)

Cause:
Attempting to drop a database while that database connection is still active.

Action:
Logon to another database or to the system catalog in order to drop the database.
Must drop Database first (DM_JDB_DATABASE_EXISTS)

Cause:
Attempting to create a database when that database already exists.

Action:
Depending on the desired outcome, either 1) drop the database so that it can be recreated, or 2) use another database name.
Not implemented (DM_JDB_NOT_IMPLEMENTED)

Cause:
Feature not implemented in JDB.*

Action:
n/a
Read-Only handle (DM_JDB_READONLY)

Cause:
Database file is specified to be read-only.

Action:
This appears as a warning when you log on and as an error if you attempt to insert or update data in the database.
NULL not allowed (DM_JDB_NULL_NOT_ALLOWED)

Cause:
Column has been defined in the CREATE TABLE statement as NOT NULL.

Action:
In an INSERT statement, a value must be entered for all columns defined as NOT NULL.
Syntax error (DM_JDB_SYNTAX_ERROR)

Cause:
Character strings are not enclosed in single quotation marks in an INSERT statement.

Action:
Add quotation marks, and reissue statement.

Cause:
Reserved keyword used as a table or column name in a CREATE TABLE statement.

Action:
Change table or column name.
Table not found (DM_JDB_TABLE_NOT_FOUND)

Cause:
Database table does not exist.

Action:
Create table, or query systabs for table names in the database.
Temporary database error (DM_JDB_TMPDATABASE_ERR)

Cause:
Unable to create temporary database needed for processing.

Action:
Check memory available.*
The number of values specified does not equal the number of columns (DM_JDB_INVALID_VALUES_COUNT)

Cause:
In an INSERT statement, the number of columns in the column list and the number of column values in the values list is not the same.

Action:
Check INSERT statements.
The subquery returned too many rows (DM_JDB_SUBQ_TOO_MANY_ROWS)

Cause:
Subquery returned multiple rows when statement needs one value.

Action:
Edit query to use different search conditions.
Type mismatch (DM_JDB_TYPE_MISMATCH)

Cause:
Inserting a character string into a column specified as integer.

Action:
JDB performs the insertion converting the character string to 0. Edit the statement to the correct value.
Unresolved column reference (DM_JDB_UNRESOLVED_COLUMN_REF)

Cause: 1
Misspelled column names in SQL statements. 2) Column values not enclosed in single quotes. 3) Column listed in an ORDER BY clause is not in the select list. 4) Incorrect table name included in correlation name or alias.

Action:
Correct syntax and reissue statement.