ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Encrypted data file
  • HFSQL Client/Server
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
<Source>.ImportHF55 (Function)
In french: <Source>.ImporteHF55
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.
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 Customer.ImportHF55("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> = <Source>.ImportHF55(<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 occurs. HError is used to identify the problem.
<Source>: Type corresponding to the specified source
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 WINDEV 5.5 analysis (.WDD file) and containing data to be imported.
<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 ("").
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "Ansi or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
<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 or Secret string
Password associated with the analysis containing the data file to import. If no password was defined, use an empty string ("").
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "Ansi or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
<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).
hImpConversionAssociated fields do not have the same type or size: data extracted from the imported data file is automatically converted or truncated.
hImpCreationIf the data file to be imported (HFSQL Classic) exists, it is overwritten.
hImpIgnoreItemFields in the destination data file (HFSQL Classic) that have no associated fields in the imported data file (Hyper File 5.5) are filled with their default value.
Fields in the imported data file (Hyper File 5.5) that have no correspondence in the destination 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:
  • fields present in the Hyper File 5.5 data file but not in the HFSQL Classic data file.
  • associated items in the two data files but with a different size and/or format.
If the data file to be imported (HFSQL Classic) already exists, it is populated with the imported data, otherwise the data file is created.
Data integrity and duplicates are not checked.
Non-imported items take the value of the current record.
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 data integrity during an import operation.
<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> = <Source>.ImportHF55(<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 occurs. HError is used to identify the problem.
<Source>: Type corresponding to the specified source
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 WINDEV 5.5 analysis (.WDD file) and containing data to be imported.
<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 or Secret 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 ("").
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "Ansi or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
<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 or Secret string
Password associated with the analysis containing the data file to import. If no password was defined, use an empty string ("").
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "Ansi or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
<List of destination items>: Character string
List of names of items found in the HFSQL Classic data file. Names can be delimited by single quotes and are separated by commas or CR characters.
Note: names corresponding to compound keys are forbidden: compound key values will be automatically recalculated when the record is added to the data file.
<List of source items>: Character string
List of names of items found in the Hyper File 5.5 data file. Names can be delimited by single quotes and are separated by commas or CR characters.
Note: names corresponding to compound 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).
hImpConversionAssociated fields do not have the same type or size: data extracted from the imported data file is automatically converted or truncated.
hImpCreationIf the data file to be imported (HFSQL Classic) exists, it is overwritten.
hImpIgnoreItemFields in the destination data file (HFSQL Classic) that have no associated fields in the imported data file (Hyper File 5.5) are filled with their default value.
Fields in the imported data file (Hyper File 5.5) that have no correspondence in the destination 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:
  • fields present in the Hyper File 5.5 data file but not 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.
Data integrity and duplicates are not checked.
Non-imported items take the value of the current record.
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 data integrity during an import operation.
<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 HFSQL Classic data file to be imported is encrypted, you must specify the password before using the <Source>.ImportHF55 function: use <Source>.Password.

HFSQL Client/Server

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

Last update: 12/06/2024

Send a report | Local help