%GetLastExtErrorCode function


Function
The function returns the extended information about the last error.
Declaration
INT  %GetLastExtErrorCode()
Description

Extended information about an error is adjusted by all the actions for work with the database (DB_*, PG_*, SQL_*, DBS_* + actions to control database transactions). Numerical value of an error is gained directly from the database engine, therefore this value depends on its type.

The implementation of database ESL action by D2000 DBManager can be aborted before calling the database engine due to detection of error. These errors are generated by D2000 DBManager and not by the database engine.

Internal errors, generated by D2000 DBManager, are basically negative:

CodeMsg
-70 001<operation>: Column [row # <row_list>] in table <table_name> cannot be NULL! User defined constraint on D2000 table object was violated.
Issue: the value is invalid in the column of a table that is marked NOT NULL in D2000.
-70 002<operation>: table <table_name>, column <column_name>, data length <data_length>, column size in DB <column_size>, aborting operation.
Issue: Size of inserted or update data is larger than the size of the respective column in the SQL table (e.g. strings).
-70 003<operation>: table <table_name>, multirow update without keys, aborting operation.
Issue: DB_Update or DBS_Update was called to update multiple rows at once, and the table in D2000 does not have a key column defined.
-70 004<operation>: table <table_name>, no columns to update in database, aborting operation.
Issue: DB_Update or DBS_Update was called and no columns corresponding to the table definition in D2000 are found in the database table.
-70 005<operation>: use keys and <row_index>, row affected no rows in the table, aborting operation.
Issue: DB_Update or DBS_Update did not update any row in the table.
-70 101Error when working with a file (DB_*_BLOB scrip actions).
-70 102Error will be used when a return code of script action is _ERR_NO_DATA (PG_READ or DB_UPDATE_BLOB).
or the error codes for DBManager, which are listed in the table _ERR_NR_TRANS_EX with reverse sign "-". For example, for TOO_MANY_ROWS_IN_SELECT the value, returned by the function, will be -48. Or, for DBM_DATABASE_OFF, the value will be -52.


Napíšte komentár