602SQL Documentation Index  

Overview of Errors Based on the Possibilities of their Handling

Errors are divided into several groups (in the tables lower) based on the server reactions and on the possibilities of treating the error with a handler.

Many errors cause a transaction rollback. If the error that causes rollback occurs inside an atomic block, then the rollback applies only for this block, the database state returns to the state before this block was entered.

"Completion Condition" category

Warnings and information about various situations belongs to this category. These errors don't require a reaction and if they're left untreated, they don't have any effects on operation processing, they never cause rollback. A client may learn of their occurrence by calling the Sz_warning function. The special error EMPTY (nr. 140 - attempt to work with a deleted and freed record) belong here as well.

"NOT FOUND" Category

Only a single error belongs to this group. This error signals depletion of records when going through a cursor. This error is usually treated with a handler. If treated (see example), the transaction is not rolled back and the client doesn't learn about this error. If not treated with a handler, this error causes transaction rollback.

API identifiernumberSQLSTATEDescription
NOT_FOUND_0200013902000FETCH statement moved the cursor position to a nonexistent record

"No Rollback Exception Condition" category

Errors in this category signal that certain operation couldn't be processed and the client won't get normal result from the server. These errors don't cause transaction rollback. They can't be treated with a handler generally, but fulltext convertor errors can be treated with CONTINUE handler.

API identifiernumberSQLSTATEDescription
OUT_OF_TABLE131n/arecord number specified in a function for reading or writing is out of records range in a table or a cursor
INTERNAL_SIGNAL184n/ainternal server signal for a client
NOTHING_TO_REPL229n/areplication failed because it's nothing to replicate - an announcement for the opposite side why the replication failed
CONVERSION_NOT_SUPPORTED226W0226fulltext engine cannot convert the specified text or haven't found the file for indexing
GERERR_FULLTEXT_CONV6005W6005generic error from an external fulltext convertor

"Handleable Exception Condition" Category

Errors that belong to this group allow you to continue operation processing after they occur, if you react in a defined way. They can be treated with handlers and if they're treated successfully, no rollback is done, and the database changes are preserved. From the client view there is no error then. If they're not treated, rollback is done.

API identifiernumberSQLSTATEDescription
THREAD_START_ERROR132W0132system couldn't execute a DETACHED routine
OBJECT_DOES_NOT_EXIST137W0137some SQL statement wants to use an object that doesn't exist
CANNOT_CONVERT_DATA141W0141data conversion in FETCH INTO can't be done
STRING_CONV_NOT_AVAIL 185W0185conversion or string comparison failed, because the needed charsets are not available; if treated with a handler, the conversion returns NULL and the comparison TRUE
SQ_INVALID_CURSOR_STATE 19624000invalid cursor state, e.g. when it's already closed
SQ_SAVEPOINT_INVAL_SPEC 197 3B001invalid savepoint designation
SQ_TRANS_STATE_ACTIVE 19925001transaction already in progress
SQ_INVAL_TRANS_TERM 2002D000forbidden transaction termination in an atomic statement
SQ_TRANS_STATE_RDONLY 20125006this transaction may not modify data
SQ_NUM_VAL_OUT_OF_RANGE 20222003number value out of range (occurrence of this error depends on the compatibility setting SQLOPT_MASK_NUM_RANGE)
SQ_INV_CHAR_VAL_FOR_CAST 20322018invalid character prohibits the type conversion (occurrence of this error depends on the compatibility setting SQLOPT_MASK_INV_CHAR)
SQ_STRING_DATA_RIGHT_TRU 20422001character string too long, truncated from the right (occurrence of this error depends on the compatibility setting SQLOPT_MASK_RIGHT_TRUNC)
SQ_DIVISION_BY_ZERO 20522012division by zero in a SQL statement
SQ_CARDINALITY_VIOLATION 20621000query result (e.g. after SELECT INTO) contains more records than one
SQ_INVALID_ESCAPE_CHAR 207 22019error in specifying the ESCAPE operator in the LIKE predicate
SQ_CASE_NOT_FOUND_STMT 208 20000SQL statement CASE doesn't contain a suitable branch
SQ_RESIGNAL_HND_NOT_ACT 210OK000RESIGNAL statement used outside condition handling
SQ_EXT_ROUT_NOT_AVAIL 211 38001extern routine not found in the specified library (DLL or so)
SQ_NO_RETURN_IN_FNC 2122F001no RETURN statement in a SQL function
SQ_INVALID_CURSOR_NAME21734000cursor of such name doesn't exist
LIBRARY_ACCESS_DISABLED223W0223extern function called from a prohibited folder (folder is enabled by the Dir property)
LIBRARY_NOT_FOUND224W0224extern library DLL or so not found
WONT_RUN_AS_ROOT228W0228extern function cannot be called, if the linux server runs under the root account
SCHEMA_IS_OPEN236W0236cannot delete an application (scheme), if it's opened by another client (thread)
GENERR_DAD_DESIGN6000W6000error in DAD design
GENERR_XERCES_INIT6001W6001error when initializing xerces libraries
GERERR_DAD_PARSING6003W6003error when analyzing the XML structure of DAD

All user defined exceptions also belong to this category, unless they're bound to a SQLSTATE that belongs to another category. Exceptions are activated with the SIGNAL or RESIGNAL statements and further process is the same as when the error occurred.

"Rollback Exception Condition" Category

Errors that don't allow you to continue operation processing after their occurrence belong to this group. Rollback is necessary when these errors occur. If a handler is available, you can do some further actions, but you can't prevent the rollback (handler is executed after the rollback).

Errors from this category are not handled inside triggers. Handler is ignored in such case.

API identifiernumberSQLSTATEDescription
NOT_LOCKED136W0136cannot lock a record open by another client
MUST_NOT_BE_NULL16040002cannot write NULL value into the column that may not be NULL
REFERENCED_BY_OTHER_OBJECT162W0162cannot delete a table or remove an index from a table, which is related to some table with a referential integrity, or cannot delete a domain used in the table definition
DEADLOCK 171W0171deadlock, some clients are blocking each other
KEY_DUPLICITY 17240004key duplicity in a unique index
CHECK_CONSTRAIN17440005table integrity constraint broken
REFERENTIAL_CONSTRAIN 17540006table referential integrity broken
TABLE_IS_FULL177W0177record count in a table out of range
TOO_COMPLEX_TRANS183W0183transaction too complex
ASSERTION_FAILED 195W0195internal error
SQ_SAVEPOINT_TOO_MANY 1983B002limit for savepoint count or open atomic blocks exceeded
SEQUENCE_EXHAUSTED219W0219sequence has reached the maximum value and cycling is not enabled
NO_CURRENT_VAL220W0220CURVAL was executed before NEXTVAL, and is not available
OBJECT_VERSION_NOT_AVAILABLE230W0230requested object version no longer exists
GERERR_XML_PARSING6002W6002XML document analysis error when importing

"Critical Exception Condition" Category

This is a group of critical errors. Server cannot continue operating when these errors occur and it cannot be expected that a handler can treat these errors. Handlers cannot be defined for these errors. Transaction rollback is done and the client gets an error message. Signals on untreated exceptions also belong to this group.

API identifiernumberDescription
OUT_OF_KERNEL_MEMORY145server out of memory
UNREADABLE_BLOCK 152disk block unreadable - internal error
OUT_OF_BLOCKS 154disk is out of space, serious error that may cause serious damage to the database file.
163-167internal errors, usually database file damage
TABLE_DAMAGED168 database table seriously damaged
INDEX_DAMAGED191index damaged
SQ_UNHANDLED_USER_EXCEPT209user defined exception not handled
SQ_TRIGGERED_ACTION 214error in an action executed by a trigger
FRAMES_EXHAUSTED232internal error, disk frames exhausted

"Errors in Client-Server Communication Causing Rollback" Category

The causes and solutions of these errors lie outside of SQL. These errors are usually caused by prohibited or incorrect client requests. They appear usually when debugging an application using the program server interface (API) as a result of passing wrong parameters into the server functions. Each of these errors causes transaction rollback and operation termination. Error message is sent to the client. These errors can't be treated with handlers on the server, but the client may do the proper action.
API identifiernumberDescription
BAD_MODIF 128program is trying to work with multiattributes or with columns with variable length as with normal columns or vice versa.
NO_RIGHT129user hasn't sufficient privileges to access data
BAD_ELEM_NUM130invalid number of table column or cursor
CURSOR_MISUSE 133invalid cursor number (e.g. when trying to use a cursor that is not opened yet, or already closed cursor or somebody else's cursor)
BAD_OPCODE134undefined client-server request
CANNOT_APPEND135cursor doesn't allow this operation (e.g. INSERT into JOIN or DELETE CURRENT OF on INSENSITIVE cursor etc.)
INDEX_OUT_OF_RANGE138index of multiattribute value or the value count is out of range according to the table definition
BAD_PASSWORD142wrong password on user login
PTR_TO_DELETED143database pointer points to a discarded record
NIL_PTR144database pointer points nowhere
RECORD_DOES_NOT_EXIST146attempt to work with a nonexisting record
IS_DELETED147attempt to work with a deleted record in a cursor or with a nonexisting table
INDEX_NOT_FOUND148index not found
OBJECT_NOT_FOUND149object in application not found
BAD_DATA_SIZE151 client passed data of incorrect length to the server
NOT_LOGGED_IN153client haven't yet logged in the server
REQUEST_BREAKED 155operation was canceled by a client during its processing
OS_FILE_ERROR157error while working with a file (this may occur both for a client and for a server)
INCOMPATIBLE_VERSION158file version incompatible with data (*.TDT)
OPERATION_DISABLED161client is connected without a licence with restricted privileges and tries to execute a prohibited operation
CANNOT_LOCK_KERNEL 169 cannot lock server for operation execution, other users are connected to the server
ROLLBACK_IN_CURSOR_CREATION170Rollback was made when creating a cursor
UNPROPER_TYPE176column type not suitable for the specified function
ERROR_IN_FUNCTION_ARG180argument value error in API function
NO_WRITE_TOKEN 186no write token valid
WAITING_FOR_ACKN187waiting for confirmation of previous replication
REPL_BLOCKED 188 replication is not yet enabled by the other side
PASSWORD_EXPIRED192password validity expired, new password required
NO_KEY_FOUND 193cannot sign, no certified key found
DIFFERENT_KEY 194cannot sign, different key used
COLUMN_NOT_EDITABLE 213cannot overwrite query column that is not editable
REPLICATION_NOT_RUNNING 215replication not running
ROLE_FROM_DIFF_APPL 218trying to set role privileges from different application (may occur when sharing back-end or front-end)
NO_WWW_LICENCE 221Internet licence for WWW access not found
NO_MORE_INTRANET_LICS 222too few intranet licences, another client refused
LANG_SUPP_NOT_AVAIL225fulltext language support not installed
NO_FULLTEXT_LICENCE227no Fulltext extension licence found on SQL server
NO_REPL_UNIKEY231table doesn't contain replication key
NO_CONF_RIGHT233user is not configuration administrator and may not carry out the operation
NO_SECUR_RIGHT234user is not security administrator and may not carry out the operation
ACCOUNT_DISABLED235user account blocked by an administrator
NO_XML_LICENCE238no XML extension licence found on SQL server

"Errors in Client-Server Communication not Causing Rollback" Category

This group of errors is outside the transaction system and doesn't affect running transactions. These errors occur at the client, or on the edge between client and server. Otherwise these errors are similar to the previous group.
API identifiernumberDescription
NOT_ANSWERED255operation not finished (for asynchronous transaction)
OUT_OF_APPL_MEMORY150client out of application memory
CONNECTION_LOST156client connection to the server lost, the server is terminated or the network connection is down
REJECTED_BY_KERNEL159client request not processed - special server state, e.g. consistency check etc.
BAD_VERSION 173client and server version don't match
REQUEST_NESTING178client request nested - new request sent before the previous is complete
CANNOT_FOR_ODBC179operation not executable for ODBC cursor
ODBC_CURSOR_NOT_OPEN 181selected ODBC cursor not open
DRIVER_NOT_CAPABLE182ODBC driver unable to process requested operation
BAD_TABLE_PROPERTIES190bad table properties
ERROR_IN_FUNCTION_CALL237error in API function call found by the client