Status code (Result value/NES)

Many of the NES supported methods return a status code that is consistently defined across all objects and methods.

The following methods will return a status code:

The status codes are summarized in the table:

00No error
01Out of memory
02Object was never initialized
03Type conversion error
04Database not registered
05Error reported by database engine
06Message from database engine
07Error from database vendor's library
08Lost connection
09End of fetch
10Invalid use of object
11Column does not exist
12Bounds error - invalid positioning within object
13Unsupported feature
14Null reference parameter
15Database object not found
16Required information missing
17Object cannot support multiple readers
18Object cannot support deletes
19Object cannot support inserts
20Object cannot support updates (1)
21Object cannot support updates (2)
22Object cannot support indices
23Object cannot be dropped
24Incorrect connection supplied
25Object cannot support privileges
26Object cannot support cursors
27Unable to open

Status codes 5 and 7 are significant. It depends on the database being used as to which is important.

Status code 5 is important for Oracle and ODBC.

Status code 7 is important for Informix and Sybase.

If these values are detected, then the major and minor error codes and messages can be inspected for further help in diagnosing the problems.

See also:Connection.majorErrorCode(), Connection.majorErrorMessage(), Connection.minorErrorCode(), Connection.minorErrorMessage(), Cursor.deleteRow(), Cursor.insertRow(), Cursor.updateRow(), database.beginTransaction(), database.commitTransaction(), database.execute(), database.majorErrorCode(), database.majorErrorMessage(), database.minorErrorCode(), database.minorErrorMessage(), database.rollbackTransaction(), Error handling