ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Encrypted data file
  • HFSQL Client/Server
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
HImportHF55 (Function)
In french: HImporteHF55
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Imports a Hyper File 5.5 data file into a data file in HFSQL Classic format.
  • The data file in Hyper File 5.5 format must be described in the data model editor.
  • The data file in HFSQL Classic format must be described in the data model editor, or it must be declared by HDeclare, HDeclareExternal or HDescribeFile.
Remarks:
  • The two data files can have different structures.
  • This function is not available when using a stand-alone executable.
Example
// Imports the name and address of customers,
// ignore the other items
IF NOT HImportHF55("CUSTOMER", "CUSTOMER", "C:\AnExample\CUSTOMER.FIC", ...
"C:\AnExample\AnExample.wdd", "", "FULLNAME,ADDRESS", ...
"NAME,ADDR", hDefaultVal + hImpConversion) THEN
  Error("Unable to import")
ELSE
// Process
...
END
Syntax

Import into a data file of same structure Hide the details

<Result> = HImportHF55(<HFSQL Classic file> , <HF55 File> , <Full path of HF55 File> , <Password of HF55 File> , <Full path of WDD 55 file> , <Password of WDD 55 File> [, <Options> [, <Progress Bar>]])
<Result>: Boolean
  • True if the operation was performed,
  • False if an error occurred. HError is used to identify the problem.
<HFSQL Classic file>: Character string
Logical name of data file in HFSQL Classic format into which the import will be performed.
<HF55 File>: Character string
Logical name of data file in Hyper File 5.5 format described in the WINDEV 5.5 analysis (.WDD file) and containing the data to import.
<Full path of HF55 File>: Character string
Full access path of Hyper File 5.5 data file to import.
<Password of HF55 File>: Character string
Password associated with the data file to import. This password will be used to decrypt the data found in the data file. If no password was defined, use an empty string ("").
<Full path of WDD 55 file>: Character string
Access path to the .WDD file of analysis in Hyper File 5.5 format. This analysis contains the description (or structure) of data file to import. All the analysis formats recognized by Hyper File 5.5 can be used (WINDEV 5.5B, 5.5, 5.0 and 4.1).
<Password of WDD 55 File>: Character string
Password associated with the analysis containing the data file to import. If no password was defined, use an empty string ("").
<Options>: Optional Integer constant (or combination of constants)
Type of import to perform:
hCopyAutoIDThe automatic identifier is copied. It is not recalculated.
If the HFSQL Classic data file contains an automatic identifier while the Hyper File 5.5 data file contains no automatic identifier, the automatic identifier is reset to 0 in the HFSQL Classic data file.
hDefaultValFor the non-imported items, the values of current record (HFSQL Classic) are reinitialized with their default value.
hImpBreakableThe import can be interrupted by pressing the Esc key on the keyboard. If the import is interrupted, the imported records are kept in the data file. A re-index operation is automatically performed if necessary (cannot be interrupted).
hImpConversionThe associated items do not have the same type or the same size: the data extracted from the imported data file is automatically converted or truncated.
hImpCreationIf the import data file (HFSQL Classic) exists, it is overwritten.
hImpIgnoreItemThe items found in the import data file (HFSQL Classic) without associated items in the imported data file (Hyper File 5.5) are filled with their default value.
The items of imported data file (Hyper File 5.5) with no match in the import data file are ignored.
hImpNormal
(default value)
This mode of import avoids any risk of data loss. The import is not performed and an error occurs in the following cases:
  • items found in the Hyper File 5.5 data file without correspondence in the HFSQL Classic data file.
  • associated items in the two data files but with a different size and/or format.
If the import data file (HFSQL Classic) already exists, it is filled with the imported data ; otherwise, the data file is created.
No management of integrity and no management of duplicates.
The non-imported items take the value of the current record.
The automatic identifiers are recalculated.
hImpNoSpaceThe space characters found at the end of string are automatically deleted during the import.
hImpTestDuplicatesChecks the duplicates during the import
hImpTestIntegrityChecks the integrity during the import
<Progress Bar>: Optional control name or window name
  • Name of window where the import progress bar will be displayed.
  • Name of the Progress Bar control where the import progress will be displayed.

Import into a file with a different structure Hide the details

<Result> = HImportHF55(<HFSQL Classic file> , <HF55 File> , <Full path of HF55 File> , <Password of HF55 File> , <Full path of WDD 55 file> , <Password of WDD 55 File> , <List of destination items> , <List of source items> [, <Options> [, <Progress Bar>]])
<Result>: Boolean
  • True if the operation was performed,
  • False if an error occurred. HError is used to identify the problem.
<HFSQL Classic file>: Character string
Logical name of data file in HFSQL Classic format into which the import will be performed.
<HF55 File>: Character string
Logical name of data file in Hyper File 5.5 format described in the WINDEV 5.5 analysis (.WDD file) and containing the data to import.
<Full path of HF55 File>: Character string
Full access path of Hyper File 5.5 data file to import.
<Password of HF55 File>: Character string
Password associated with the data file to import. This password will be used to decrypt the data found in the data file. If no password was defined, use an empty string ("").
<Full path of WDD 55 file>: Character string
Access path to the .WDD file of analysis in Hyper File 5.5 format. This analysis contains the description (or structure) of data file to import. All the analysis formats recognized by Hyper File 5.5 can be used (WINDEV 5.5B, 5.5, 5.0 and 4.1).
<Password of WDD 55 File>: Character string
Password associated with the analysis containing the data file to import. If no password was defined, use an empty string ("").
<List of destination items>: Character string
List of names of items found in the HFSQL Classic data file. The names can be delimited by single quotes and they are separated by commas or CR characters.
Remark: the names corresponding to composite keys are not allowed: the values of composite keys will be automatically re-calculated when the record is added into the data file.
<List of source items>: Character string
List of names of items found in the Hyper File 5.5 data file. The names can be delimited by single quotes and they are separated by commas or CR characters.
Remark: the names corresponding to composite keys are allowed. The number of items must correspond to the number of items specified in <List of Destination items>.
<Options>: Optional Integer constant (or combination of constants)
Type of import to perform:
hCopyAutoIDThe automatic identifier is copied. It is not recalculated.
If the HFSQL Classic data file contains an automatic identifier while the Hyper File 5.5 data file contains no automatic identifier, the automatic identifier is reset to 0 in the HFSQL Classic data file.
hDefaultValFor the non-imported items, the values of current record (HFSQL Classic) are reinitialized with their default value.
hImpBreakableThe import can be interrupted by pressing the ESC key. If the import is interrupted, the imported records are kept in the data file. A re-index operation is automatically performed if necessary (cannot be interrupted).
hImpConversionThe associated items do not have the same type or the same size: the data extracted from the imported data file is automatically converted or truncated.
hImpCreationIf the import data file (HFSQL Classic) exists, it is overwritten.
hImpIgnoreItemThe items found in the import data file (HFSQL Classic) without associated items in the imported data file (Hyper File 5.5) are filled with their default value.
The items of imported data file (Hyper File 5.5) with no match in the import data file are ignored.
hImpNormal
(default value)
This mode of import avoids any risk of data loss. The import is not performed and an error occurs in the following cases:
  • items found in the Hyper File 5.5 data file without correspondence in the HFSQL Classic data file.
  • associated items in the two data files but with a different size and/or format.
If the import data file (HFSQL Classic) already exists, it is filled with the imported data ; otherwise, the data file is created.
No management of integrity and no management of duplicates.
The non-imported items take the value of the current record.
The automatic identifiers are recalculated.
hImpNoSpaceThe space characters found at the end of string are automatically deleted during the import.
hImpTestDuplicatesChecks the duplicates during the import.
hImpTestIntegrityChecks the integrity during the import.
<Progress Bar>: Optional control name or window name
  • Name of window where the import progress bar will be displayed.
  • Name of the Progress Bar control where the import progress will be displayed.
Remarks

Encrypted data file

If the data file in HFSQL Classic format into which the import must be performed is encrypted, the password must be specified before using HImportHF55: use the HPass function.

HFSQL Client/Server

If the import must be performed into an HFSQL Client/Server data file, the connection must be specified before using HImportHF55. For example:
HChangeConnection(MyCSFile, cntHFCS)
HImportHF55(MyCSFile, My55File, ...)
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help