Defines the mode for comparing data files. This comparison is performed when the data files are opened.
- the structure of HFSQL data file described in the analysis,
- the real structure of physical HFSQL data file.
By default, these two structures must be strictly identical in order to be able to handle the data file.
Depending on the selected mode, a WLanguage error may occur if incompatible structures are found. In this case, you must apply the automatic modification of data files.
Remark: The description used by the application always corresponds to the description of physical HFSQL file.
// Allows the opening of "Customer" file
// Even if the structures are different
<Result> = HCheckStructure([<Data file>, ] <Management mode>)
<Result>: Integer constant
Former management mode of description (before the call to HCheckStructure).
<Data file>: Optional character string (with or without quotes)
Name of data file used.
If this parameter is not specified or if it corresponds to "*", the management of descriptions is taken into account for all the data files of the analysis.
<Management mode>: Integer constant
Selected management mode:
|hNoCheck||No check is performed, the analysis description may differ from the description of physical file.|
|The structures of data files must be compatible. If one of the following operations is performed, the structures are considered as being incompatible:|
- Adding a unique key item (except an automatic identifier).
- Switching a key with duplicates into unique key.
- Deleting or renaming an item.
- Changing the type of an item (except changing from text to Unicode text).
- Reducing the size of item.
- Reducing the integer part or the decimal part of a Numeric item.
- An item becomes a non-key item.
- Deleting a full-text index.
- Adding or deleting items to/from a full-text index (however, the creation of a new full-text item is compatible).
|The structures must be strictly identical.|
HCheckStructure must be used:
- before establishing the connection to avoid the calls to the server.
- before opening the data files.
hCompatible: conditions for considering the structures as being incompatible
If one of the following differences exists between the description of data file found in the analysis and the description of the data file saved in the physical file, the structures are considered as being incompatible by the HFSQL engine: an automatic modification is required.
|Structure in the analysis||Structure read in the physical data file||Possible consequence|
|- automatic identifier|
- key with duplicates
- non-key item
|Unique key and not automatic identifier||A duplicate error may occur when adding a record. |
Remark: No problem will occur if only read operations are performed on the data file.
|Using the "XXX" item||The "XXX" item does not exist||Adding a value for an item that does not exist in the physical file.|
|The "XXX" item was renamed.|
|Different type of item||Invalid conversion when assigning the value to the item.|
Value assigned to the truncated item.
Change of operating mode:
- Exact-match search only
- Browse performed on the record number
|Different size of item|
|Key item||Non-key item|
This function is not available when using a database via Remote Access