PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
HRegenerateFile (Function)
In French: HRégénèreFichier
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
Regenerates a data file from its log.
Reminder: When a logged data file is lost, you have the ability to regenerate it from its log. To do so, we recommend that you use the tool for log maintenance.
Caution: HRegenerateFile is used to re-create a data file from the log description.

This function is an advanced function. Used wrongly, this function can destroy or corrupt the data.
Windows Mobile Caution: The log process is available in Client/Server mode only.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Example
// The "Customer" file is logged.
// The "Customer" file is found in the "C:\Data" directory.
// The log file of "Customer.fic" is found in the "C:\Log" directory.
// The "Customer" file was destroyed.
// Rebuild the file from the log
HRegenerateFile("C:\Log\CustomerJNL.fic", hStructure + hData)
Syntax
WINDEVWEBDEV - Server codeWindows MobileAjaxHFSQLHyper File 5.5

Regenerating the data file in HFSQL Classic mode Hide the details

<Result> = HRegenerateFile(<Name of 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> [, <Progress Bar of Reindex Operation>]]]]])
<Result>: Boolean
  • True if the data file was regenerated,
  • False otherwise. HError is used to identify the error.

    Windows Mobile This function can only be used on HFSQL Client/Server data files. This function returns True but it has no effect on the HFSQL Mobile data files.
<Name of Log File>: Character string (with quotes)
Full name of the log file to use.
<Password>: Optional character string (with quotes)
  • 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 (with quotes)
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 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 found 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 found 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 character string (with or without quotes)
Name of Progress Bar control found in the current window. This control will be used to view the progress of the restore operation.
<Progress Bar of Reindex Operation>: Optional character string (with or without quotes)
Name of Progress Bar control found in the current window. This control will be used to view the progress of the reindex operation (once the data is restored).
WINDEVWEBDEV - Server codeWindows MobileAjaxHFSQL Client/Server

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

<Result> = HRegenerateFile(<Connection Name>, <Name of Log File> [, <Password> [, <Destination Directory> ]] [, <Options> [, <Date and Time for Start of Restore Operation> [, <Date and Time for End of Restore Operation> [, <Progress Bar of Restore Operation> [, <Progress Bar of Reindex Operation>]]]]])
<Result>: Boolean
  • True if the data file was regenerated,
  • False otherwise. HError is used to identify the error.

    Windows Mobile This function can only be used on HFSQL Client/Server data files. This function returns True but it has no effect on the HFSQL Mobile data files.
<Connection Name>: Character string (with or without quotes)
Name of the connection for which the database must be regenerated. This connection was defined in the data model editor, or by HDescribeConnection or HOpenConnection.
<Name of Log File>: Character string (with quotes)
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 (with quotes)
  • 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 (with quotes)
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 YYYYMMDDHHMMSSMMM format: YYYY: year, MM: month, DD: day, HH: hour, MM: minutes, SS: seconds, CC: hundredths of a second) from which the operations found 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 YYYYMMDDHHMMSSMMM format: YYYY: year, MM: month, DD: day, HH: hour, MM: minutes, SS: seconds, CC: hundredths of a second) up to which the operations found 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 character string (with or without quotes)
Name of Progress Bar control found in the current window. This control will be used to view the progress of the restore operation.
<Progress Bar of Reindex Operation>: Optional character string (with or without quotes)
Name of Progress Bar control found 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 logged HFSQL Classic or Client/Server data files.
Components
WINDEVWEBDEV - Server code wd230hf.dll
Windows Mobile wp230hf.dll
Linux wd230hf.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment