4D v13.4VERIFY DATA FILE |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
VERIFY DATA FILE
|
VERIFY DATA FILE ( structurePath ; dataPath ; objects ; options ; method {; tablesArray {; fieldsArray}} ) | ||||||||
Parameter | Type | Description | ||||||
structurePath | Text |
![]() |
Pathname of 4D structure file to be checked | |||||
dataPath | Text |
![]() |
Pathname of 4D data file to be checked | |||||
objects | Longint |
![]() |
Objects to be checked | |||||
options | Longint |
![]() |
Checking options | |||||
method | Text |
![]() |
Name of 4D callback method | |||||
tablesArray | Longint array |
![]() |
Numbers of tables to be checked | |||||
fieldsArray | 2D Integer array, 2D Longint array, 2D Real array |
![]() |
Numbers of indexes to be checked | |||||
Constant | Type | Value | Comment |
Verify All | Longint | 16 | |
Verify Indexes | Longint | 8 | This option checks the physical consistency of the indexes, without any link with the data. It signals invalid keys but does not permit you to detect duplicated keys (two indexes that point to the same record). This type of error can only be detected with the Verify All option. |
Verify Records | Longint | 4 |
Constant | Type | Value | Comment |
Do not create log file | Longint | 16384 | Generally, this command creates a log file in XML format (refer to the end of the command description). With this option, no log file will be created. |
- $1 | Longint | Message type (see table) |
- $2 | Longint | Object type |
- $3 | Text | Message |
- $4 | Longint | Table number |
- $5 | Longint | Reserved |
The following table describes the contents of the parameters depending on the event type:
$1 (Longint) | $2 (Longint) | $3 (Text) | $4 (Longint) | $5 (Longint) | |
Message | 1 | 0 | Progression | Percentage | Reserved |
message | done (0-100) | ||||
Verification finished(*) | 2 | Object type (**) | OK message | Table or index | Reserved |
test | number | ||||
Error | 3 | Object type (**) | Text of error- | Table or index | Reserved |
message | number | ||||
End of execution | 4 | 0 | DONE | 0 | Reserved |
Warning | 5 | Object type(**) | Text of error | Table or index | Reserved |
message | number |
(*) The Verification finished ($1=2) event is never returned when the mode is Verify All. It is only used in Verify Records or Verify Indexes mode.
(**) Object type: When an object is verified, a "finished" message ($1=2), error ($1=3) or warning ($1=5) can be sent. The object type returned in $2 can be one of the following:
Special case: When $4 = 0 for $1=2, 3 or 5, the message does not concern a table or an index but rather the data file as a whole.
The callback method must also return a value in $0 (Longint), which is used to check the execution of the operation:
Note: You cannot interrupt execution via $0 after the End of execution event ($4=1) has been generated.
Two optional arrays can also be used by this command:
By default, the VERIFY DATA FILE command creates a log file in XML format (if you have not passed the Do not create log file option, see the options parameter). Its name is based on that of the data file and it is placed in the "Logs" folder of the database. For example, for a data file named “data.4dd,” the log file will be named “data_verify_log.xml.”
Simple checking of data and indexes:
VERIFY DATA FILE($StructName;$DataName;Verify Indexes+Verify Records;Do not create log file;"")
Complete verification with log file:
VERIFY DATA FILE($StructName;$DataName;Verify All;0;"")
Checking of records only:
VERIFY DATA FILE($StructName;$DataName;Verify Records;0;"")
Checking of records from tables 3 and 7 only:
ARRAY LONGINT($arrTableNums;2)
$arrTableNums{1}:=3
$arrTableNums{2}:=7
VERIFY DATA FILE($StructName;$DataName;Verify Records;0;"FollowScan";$arrTableNums)
Checking of specific indexes (index of field 1 of table 4 and index of fields 2 and 3 of table 5):
ARRAY LONGINT($arrTableNums;0) `not used but mandatory
ARRAY LONGINT($arrIndex;2;0) `2 rows (columns added later)
$arrIndex{1}{0}:=4 ` table number in element 0
APPEND TO ARRAY($arrIndex{1};1) `number of 1st field to be checked
$arrIndex{2}{0}:=5 ` table number in element 0
APPEND TO ARRAY($arrIndex{2};2) ` number of 1st field to be checked
APPEND TO ARRAY($arrIndex{2};3) ` number of 2nd field to be checked
VERIFY DATA FILE($StructName;$DataName;Verify Indexes;0;"FollowScan";$arrTableNums;$arrIndex)
If the callback method does not exist, an error is generated and the system variable OK is set to 0.
Product: 4D
Theme: 4D Environment
Number:
939
Modified: 4D v11 SQL Release 3