XBase.ErrorCode

Syntax:

ErrorCode()

Returned value:

Type: Number.
Last error code.
Returned error codes:
  • -10 - File closing error;
  • -20 - File creation error;
  • -30 - Error in defining file length;
  • -40 - Error in setting file length;
  • -50 - Error in attempting to lock file;
  • -60 - File opening error;
  • -70 - File reading error;
  • -80 - File deletion error;
  • -90 - File renaming error;
  • -100 - File positioning error;
  • -110 - Error in removing lock from file;
  • -120 - Error in writing to file;
  • -200 - File is not a DBF-format database;
  • -210 - Unidentified field name;
  • -220 - Unidentified field type;
  • -230 - Record is too long;
  • -300 - Index file does not contain information on the file;
  • -310 - Violation of index file structure;
  • -330 - Specified index name is not accessible;
  • -340 - Unique index error;
  • -400 - Comma or parentheses expected;
  • -410 - Expression incomplete;
  • -422 - IIF() requires parameters of equal length;
  • -425 - The 2nd and 3rd parameters for STR() and SUBSTR() are constants;
  • -430 - Incorrect number of parameters;
  • -440 - Expression too complex;
  • -450 - Right parenthesis missing;
  • -460 - Incorrect subexpression type;
  • -470 - undefined function;
  • -480 - undefined operator;
  • -490 - undefined value;
  • -500 - Expression not ended with quotation marks;
  • 920 - Insufficient memory.

Description:

Receives the return code for the last operation.

Availability:

Thin client, server, thick client, external connection.

Example:

If xB.ErrorCode() = -60 Then
    Message("Can't open the DBF file!");
EndIf
;


    

1C:Enterprise Developer's Community