ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Logged replication and log process: Directory for file creation
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
HCreateMasterReplica (Function)
In french: HCréeRéplicaMaître
ODBCOLE DBNot available with these kinds of connection
Creates the description file of a Master Replica (logged 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 setup phase of the application that manages the replication.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad Only the universal replication is available.
Example
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)AjaxHFSQL ClassicHFSQL Client/ServerHyper File 5.5
// Example 1: Creates the file of master replica in the C:\RPL\Paris directory
// while specifying a file name
HCreateMasterReplica("C:\RPL\Paris\ParisReplica.RPM")
// Example 2: Creates the file of master replica in the C:\TEMP directory
// without specifying a file name
HCreateMasterReplica("C:\TEMP")
// Example 3: Creates the file of master replica in the current directory
HCreateMasterReplica()
Syntax
<Result> = HCreateMasterReplica([<Directory of master replica>])
<Result>: Boolean
  • True if the master replica was created,
  • False otherwise (the file already exists in the specified directory for example).
<Directory of master replica>: 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 corresponds to an empty string: the MasterReplica.RPM file is created in the directory specified in the analysis (RPL subdirectory of the data files by default). 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 name of directory (network or UNC directory): the MasterReplica.RPM file is created in the specified directory.
    Example: HCreateMasterReplica("C:\Temp") creates the ReplicaMaître.RPM file in the C:\Temp directory.
  • has the <Directory>\<FileName>.RPM format: the <FileName>.RPM file is created in the specified directory.
    Example: HCreateMasterReplica("C:\Temp\Paris.RPM") creates the Paris.RPM file in the C:\Temp directory.
Remarks
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)AjaxHFSQL ClassicHFSQL Client/ServerHyper File 5.5

Logged replication and log process: Directory for file creation

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 by programming.
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 by programming.
Default valueWhere to configure it in the data model editor?How to change the default value through programming?
Directory of data filesExecutable directory.
  • For all the data files of the application: "Details" tab of the analysis description
  • For each data file: "Info" tab of the description of the data file.
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.
Remark: To modify the directory for one of the files only, use HChangeDir.
Directory of the files for replicationRPL sub-directory of the default directory of the data files."Log\Replica" tab of the analysis description.Specify the desired directory in HCreateMasterReplica and HCreateSubscriberReplica.
Directory of files for log processJNL subdirectory of the default directory of data files.
  • For all the data files of the application: "Log\Replica" tab of the analysis description.
  • For each data file: "Various" tab of the description of the data file.
To modify the directory of log files, use HChangeLogDir.
This function is used to:
  • change the directory of Log file (JNL file)
  • change the directory of the JNL file and the directory of the files for the log process (JournalIdentification and JournalOpération files).
Caution: To manage the logged replication in an application, the table of the log operations (JournalOpération.fic file) must be identical for all the data files in replication in the same analysis.
Business / UI classification: Business Logic
Component: wd290rpl.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/12/2023

Send a report | Local help