Error Codes

Chapter Updated 04/07/23


Error Codes and Error Processing

Alomost all Xbase64 methods and functions return and xbInt16 return code, which is zero or positive on success and negative if an error condition occurs.

As of the 4.x.x release, the library has been extensively updated to use exception processing and most error conditions will result in a mesage written to the logfile if logfile processing is enabled. The error routines typically write two values to the logfile, an error code value and an iErrorStop value which identifies where exactly in the library code the error occurred.

Error codes are defined in the xbretcod.h file.


File TypeDescription *.DBFMain database file or Table *.DBTMemo file data *.INFINF - Behave like MS ODBC File. Used to auto open NDX index file *.MDXProduction V4 index file, contains up to 47 tags. Automatically opened. *.NDXNon production V3 index files. Contains one tag per file. Automatically opened if included in ocrreespondin INF file.


DescriptionError CodeCategory
XB_NO_ERROR 0 general
XB_NO_MEMORY -100 general
XB_INVALID_OPTION -101 general
XB_INVALID_PARAMETER -102 general
XB_DUP_TABLE_OR_ALIAS -110 table manager
XB_INVALID_NODELINK -120 linklist
XB_KEY_NOT_UNIQUE -121 linklist
XB_FILE_EXISTS -200 file
XB_ALREADY_OPEN -201 file
XB_DBF_FILE_NOT_OPEN -202 file
XB_FILE_NOT_FOUND -203 file
XB_FILE_TYPE_NOT_SUPPORTED -204 file
XB_RENAME_ERROR -205 file
XB_INVALID_OBJECT -206 file
XB_NOT_OPEN -207 file
XB_NOT_FOUND -208 file
XB_OPEN_ERROR -209 file
XB_CLOSE_ERROR -210 file
XB_SEEK_ERROR -211 file
XB_READ_ERROR -212 file
XB_WRITE_ERROR -213 file
XB_EOF -214 file
XB_BOF -215 file
XB_INVALID_BLOCK_SIZE -216 file
XB_INVALID_BLOCK_NO -217 file
XB_INVALID_RECORD -218 file
XB_DELETE_FAILED -219 file
XB_INVALID_TABLE_NAME -220 file
XB_EMPTY -221 file
XB_LIMIT_REACHED -222 file
XB_BLOCKREAD_NOT_ENABLED -223 file
XB_DIRECTORY_ERROR -224
XB_INVALID_FIELD_TYPE -300 field
XB_INVALID_FIELD_NO -301 field
XB_INVALID_DATA -302 field
XB_INVALID_FIELD_NAME -303 field
XB_INVALID_MEMO_FIELD -304 field
XB_INVALID_FIELD -305 field
XB_INVALID_FIELD_LEN -306 field
XB_INVALID_DATE -307 date field
XB_INVALID_LOCK_OPTION -400 lock
XB_LOCK_FAILED -401 lock
XB_TABLE_NOT_LOCKED -402 lock - need table locked for operation
XB_PARSE_ERROR -500 expression
XB_INVALID_FUNCTION -501 expression
XB_INVALID_PARM -502 expression
XB_INCONSISTENT_PARM_LENS -503 expression
XB_INCOMPATIBLE_OPERANDS -504 expression
XB_UNBALANCED_PARENS -505 expression
XB_UNBALANCED_QUOTES -506 expression
XB_INVALID_EXPRESSION -507 expression
XB_INVALID_KEYNO -600 index
XB_INVALID_INDEX -601 index file error
XB_INVALID_TAG -602 invalid index tag name, must be <= 10 bytes
XB_INVALID_PAGE -603 invalid index page
XB_SYNTAX_ERROR -700 sql syntax error