ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
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
<Connection variable>.RegenerateFile (Function)
In french: <Variable Connexion>.RégénèreFichier
HFSQL Client/ServerAvailable only with this kind of connection
Regenerates a data file from its log.
Reminder: When a data file is lost, you can regenerate it from its log. To do so, we recommend that you use the tool for log maintenance.
Caution: <Connection variable>.RegenerateFile recreates a data file from the log description.

This function is an advanced function. Used wrongly, this function can destroy or corrupt the data.
WINDEVWEBDEV - Server codeAjaxHFSQL Client/Server

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

<Result> = <Connection>.RegenerateFile(<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 was regenerated,
  • False otherwise. HError is used to identify the error.
<Connection>: Connection variable
Name of the Connection variable that describes the connection for which the database must be regenerated.
<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 character 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.
<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 re-created.
<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 a second) from which the operations 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 a second) up to which the operations 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.
<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
<Connection variable>.RegenerateFile can only be used on HFSQL Classic or Client/Server data files that have logs.
Component: wd290hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/07/2023

Send a report | Local help