ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Tips
  • hCompatible: conditions for considering the structures as being incompatible
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
HCheckStructure (Function)
In french: HVérifieStructure
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Defines the mode for comparing data files. This comparison is performed when the data files are opened.
Are compared:
  • 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.
Java This function is available for HFSQL data files only. It is not available for the data files accessed by JDBC.
Example
// Allows the opening of "Customer" data file
// Even if the structures are different
HCheckStructure(Customer, hNoCheck)
Syntax
<Result> = HCheckStructure([<Data file>, ] <Management mode>)
<Result>: Integer constant
Former management mode of description (before the call to HCheckStructure).
<Data file>: Optional character string
Name of the 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:
hCompatible
(default value)
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).
hIdentical
The structures must be strictly identical.
hNoCheckNo check is performed, the analysis description may differ from the description of physical file.
Remarks

Tips

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 analysisStructure read in the physical data filePossible consequence
- automatic identifier
or
- key with duplicates
or
- non-key item
Unique key and not automatic identifierA 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" itemThe "XXX" item does not existAdding 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 itemNon-key item
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help