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
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
HRegenerateFile (Function)
In french: HRégénèreFichier
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Regenerates a data file from its log.
Reminder When a data file is lost, it is possible to regenerate it from its log file. To do so, we recommend that you use the tool for log maintenance.
Attention The function HRegenerateFile function is used to recreate a data file from the log file description.

This function is for advanced use only. Used incorrectly, this function can destroy or corrupt data.
Example
// Le fichier de données "Client" est journalé.
// Le fichier de données "Client" se trouve dans le répertoire "C:\Données".
// Le journal du fichier de données "Client.fic" se trouve dans le répertoire "C:\Journal".
// Le fichier de données "Client" a été détruit.
// Reconstruction du fichier de données à partir du journal
HRegenerateFile("C:\Journal\ClientJNL.fic", hStructure + hData)
Syntax
WINDEVWEBDEV - Server codeAjaxHFSQL ClassicHyper File 5.5

Regenerating the data file in HFSQL Classic mode Hide the details

<Result> = HRegenerateFile(<Log file> [, <Password> [, <Destination directory>]] [, <Options> [, <Start date and time of restore operation> [, <End date and time of restore operation> [, <Progress bar of restore operation> [, <Reindexing progress bar>]]]]])
<Result>: Boolean
  • True if the data file has been regenerated,
  • False otherwise. HError is used to identify the error.
<Log file>: Character string
Full name of the log file to use.
<Password>: Optional string or Secret string
  • Password of the log file (identical to the password defined for the data file). This password is mandatory to specify a destination directory.
  • Empty string ("") if there is no password.
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.
<Destination directory>: Optional character string
Full name of the directory where the data file will be regenerated.
If this parameter is not defined, the data file is regenerated in its source directory.
<Options>: Optional constant (or combination of constants)
Configures the regeneration of the file. The function has no effect by default (no selected option).
hDataAll the operations stored in the log file are applied to the existing data file. The file data is updated from the data found in the log.
hStructureA new empty data file is created from the description of the data file in the log file. If the data file already exists, it is deleted then recreated.
<Start date and time of restore operation>: Character string or optional DateTime variable
Date and time (in YYYYMMDDHHmmSSCCC format: YYYY: year, MM: month, DD: day, HH: hour, mm: minutes, SS: seconds, CCC: hundredths of seconds) from which the operations present in the log file will be replayed on the backup file. The data file will be updated. If no date and time is specified, all the operations found in the log file will be replayed.
<End date and time of restore operation>: Character string or optional DateTime variable
Date and time (in YYYYMMDDHHmmSSCCC format: YYYY: year, MM: month, DD: day, HH: hour, mm: minutes, SS: seconds, CCC: hundredths of seconds) up to which the operations present in the log file will be re-played on the backup file. The data file will be updated. If no date and time is specified, all the operations found in the log file will be replayed.
<Progress bar of restore operation>: Optional control name
Name of the Progress Bar control in the current window. This control will be used to view the progress of the restore operation.
<Reindexing progress bar>: Optional control name
Name of the Progress Bar control in the current window. This control will be used to view the progress of the reindex operation (once the data is restored).
WINDEVWEBDEV - Server codeAjaxHFSQL Client/Server

Regenerating the data file in HFSQL Client/Server mode Hide the details

<Result> = HRegenerateFile(<Connection> , <Log file> [, <Password> [, <Destination directory>]] [, <Options> [, <Start date and time of restore operation> [, <End date and time of restore operation> [, <Progress bar of restore operation> [, <Reindexing progress bar>]]]]])
<Result>: Boolean
  • True if the data file has been regenerated,
  • False otherwise. HError is used to identify the error.
<Connection>: Character string
Connection for which the database must be regenerated. This connection corresponds to:
<Log file>: Character string
Name of the log file to use. The path of this file is relative to the JNL database of the connection (see Structure of log files in Client/Server mode).
<Password>: Optional string or Secret string
  • Password of the log file (identical to the password defined for the data file). This password is mandatory to specify a destination directory.
  • Empty string ("") if there is no password.
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.
<Destination directory>: Optional character string
Name of the directory where the data file will be regenerated. This directory is relative to the database defined by the connection. If this parameter is not defined, the data file is regenerated in its source directory.
<Options>: Optional constant (or combination of constants)
Configures the regeneration of the data file. The function has no effect by default (no selected option).
hDataAll the operations stored in the log file are applied to the existing data file. The file data is updated from the data found in the log.
hStructureA new empty data file is created from the file description found in the log file. If the data file already exists, it is deleted then recreated.
<Start date and time of restore operation>: Character string or optional DateTime variable
Date and time (in YYYYMMDDHHmmSSCCC format: YYYY: year, MM: month, DD: day, HH: hour, mm: minutes, SS: seconds, CCC: hundredths of seconds) from which the operations present in the log file will be replayed on the backup file. The data file will be updated. If no date and time is specified, all the operations found in the log file will be replayed.
<End date and time of restore operation>: Character string or optional DateTime variable
Date and time (in YYYYMMDDHHmmSSCCC format: YYYY: year, MM: month, DD: day, HH: hour, mm: minutes, SS: seconds, CCC: hundredths of seconds) up to which the operations present in the log file will be re-played on the backup file. The data file will be updated. If no date and time is specified, all the operations found in the log file will be replayed.
<Progress bar of restore operation>: Optional control name
Name of the Progress Bar control in the current window. This control will be used to view the progress of the restore operation.
<Reindexing progress bar>: Optional control name
Name of the Progress Bar control in the current window. This control will be used to view the progress of the reindex operation (once the data is restored).
Remarks
HRegenerateFile can only be used on HFSQL Classic or Client/Server data files that have logs.
Component: wd300hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/16/2025

Send a report | Local help