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
  • Day-to-day replication and logging: File creation directories
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
HCreateMasterReplica (Function)
In french: HCréeRéplicaMaître
ODBCOLE DBNot available with these kinds of connection
Creates the description file of a Master Replica (log-based replication or universal replication)). The extension of the corresponding file is ".rpm".
The description file of a Master Replica contains the list of Subscriber Replicas with their date of last synchronization. This file is empty when it is created. You must call HCreateSubscriberReplica to initialize this file.
Remark: This function is automatically called during the installation phase of the replication application.
AndroidAndroid Widget iPhone/iPad Only universal replication is available.
Example
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)AjaxHFSQL ClassicHFSQL Client/ServerHyper File 5.5
// Example 1: Create the master replica file in directory C:\RPL\Paris
// while specifying a file name
HCreateMasterReplica("C:\RPL\Paris\ParisReplica.rpm")
// Example 2: Create the master replica file in directory C:\TEMP
// without specifying a file name
HCreateMasterReplica("C:\TEMP")
// Example 3: Create the master replica file in the current directory
HCreateMasterReplica()
Syntax
<Result> = HCreateMasterReplica([<Master replica directory>])
<Result>: Boolean
  • True if the master replica was created,
  • False otherwise (the file already exists in the specified directory for example).
<Master replica directory>: Optional character string
Directory where the description file of Master Replica must be created. This directory must be accessible when HCreateMasterReplica is used.
If this parameter:
  • is not specified or is an empty string: the file ReplicaMaître.rpm is created in the directory defined in the analysis (default RPL subdirectory for data files).. For the universal replication, if this parameter is not specified or if it corresponds to an empty string (""), the file is created in the current directory.
  • corresponds to a directory name (network or UNC directory): the ReplicaMaître.rpm file is created in the specified directory.
    Example: HCreateMasterReplica("C:\Temp") creates the file ReplicaMaster.rpm in the C:\Temp directory.
  • is of the form <Répertoire>\<NomFichier>.rpm: the file <NomFichier>.rpm is created in the specified directory..
    Example: HCreateMasterReplica("C:\Temp\Paris.rpm") creates the file Paris.rpm in the C:\Temp directory.
Remarks
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)AjaxHFSQL ClassicHFSQL Client/ServerHyper File 5.5

Day-to-day replication and logging: File creation directories

Log-based replication is closely linked to the log process. The log process is automatically enabled when log-based replication is implemented in an application.
For all the files used (data files, log files or replication files), the paths of the corresponding physical files can be defined in the data model editor or programmatically.
By default, the tree structure of data files is as follows (example for the SalesMgt application):
The following table presents the default value for these different directories and their configuration mode in the data model editor or programmatically.
Default valueWhere to configure it in the data model editor?How to change the default value through programming?
Data file directoryExecutable directory.
  • For all data files in the application: "Detail" tab of the analysis description
  • For each data file: "Info" tab in the data file description.
To modify the default directory for the data files of the application, use HSubstDir.
When creating the files for the log process and for the replication, the created directories will be relative to this new directory.
Note: To modify only the directory of one of the files, use the HChangeDir function.
Replication file directoryRPL subdirectory of the default directory of the data files."Log\Replica" tab of the analysis description.Specify the desired directory in HCreateMasterReplica and HCreateSubscriberReplica.
Log file directoryJNL subdirectory of the default directory of data files.
  • For all application data files: "Log\Replica" tab in the analysis description.
  • For each data file: "Miscellaneous" tab in the data file description.
To modify the directory of log files, use HChangeLogDir.
This function is used to:
  • change the directory of the Log file (JNL file)
  • change the directory of the JNL file and logging files (JournalIdentification and JournalOperation files).

Please note To manage log replication in an application, the log operations table (JournalOperation.fic file) must be identical for all replicated data files in the same analysis.
Business / UI classification: Business Logic
Component: wd300rpl.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/06/2024

Send a report | Local help