PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Logged replication: Directory for creating the files required by the replication and by the log process
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
Creates the description file of a subscriber replica. The extension of the file corresponding to the subscriber replica is .RPL.
This function can be used with the logged replication and/or with the universal replication
Caution: When creating a subscriber replica, you must:
AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App Only the universal replication is available.
Note: The replication is not available when accessing a database via Remote access.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 19 and later
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 19
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 22 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
New in version 22
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Example
WINDEVWEBDEV - Server codeReports and QueriesWindows MobileAjaxUser code (UMC)HFSQLHyper File 5.5
// Create the master replica file in the C:\RPL\France directory
// while specifying a file name
HCreateMasterReplica("C:\RPL\France\ReplicaFrance.RPM")
// Create the subscriber replica
HCreateSubscriberReplica("C:\RPL\France\", "C:\RPL\USA", 1)
Syntax

Universal replication Hide the details

<Result> = HCreateSubscriberReplica(<Directory of Master Replica> , <Directory of Subscriber Replica> , <Identifier> , <Size of Range of Identifiers> , <List of Tables to Replicate>)
<Result>: Integer
  • Identifier of Subscriber Replica that was created,
  • 0 if no subscriber replica was created.
<Directory of Master Replica>: Character string (with quotes)
Directory where the description file of Master Replica (RPM file) was created (HCreateMasterReplica). This directory can be a network directory or a UNC path.
If this parameter corresponds to an empty string (""), the description file will be sought in the current directory of HFSQL data files (defined in the data model editor or by programming).
Caution: This directory must be accessible when running HCreateSubscriberReplica.
<Directory of Subscriber Replica>: Character string (with quotes)
Directory where the description file of Subscriber Replica must be created. This file is named Replica_<Identifier>.RPL.
If this parameter corresponds to an empty string (""), the description file will be created in the current directory of HFSQL data files (defined in the data model editor or by programming).
<Identifier>: Integer or character string
Identifier of the subscriber replica. This identifier will be used by HCreateMoveableReplica.
A WLanguage error occurs if the specified identifier already exists.
<Size of Range of Identifiers>: Integer
This parameter is ignored.
<List of Tables to Replicate>: Character string
This list has the following format:
<TableName>[+TAB+<NameDateItem>][+<CR>+<TableName>[+TAB+<NameDateItem>]]...
Caution: The order of the tables is important. The order of the tables is the order of the dependencies for the tables.
If the records of file 1 are linked to the records of file 2 and if the record must be found in file 2 in order for the addition in file 1 to comply with the integrity rules, then file 1 must be positioned first in the list.
For example, for the "Customer", "Orders" and "Order line" files (that are linked by links whose cardinalities are (0,n) - (1,1)), the "Customer" file must be positioned first (a customer must exist to add an order), then the "Orders" file (an order must exist to add an order line) and finally the "Order line" file.
The name of the Date item is mandatory for the databases not in HFSQL format. This item must correspond to an item of the data file updated during an addition or during a modification. This operation must be performed by the application.
WINDEVWEBDEV - Server codeReports and QueriesAjaxUser code (UMC)HFSQL

Logged replication (between HFSQL databases) Hide the details

<Result> = HCreateSubscriberReplica(<Directory of Master Replica> , <Directory of Subscriber Replica> [, <Identifier> [, <Size of Range of Identifiers>]])
<Result>: Integer
  • Identifier of Subscriber Replica that was created,
  • 0 if no subscriber replica was created.
<Directory of Master Replica>: Character string (with quotes)
Directory where the description file of Master Replica (RPM file) was created (HCreateMasterReplica). This directory can be a network directory or a UNC path.
If this parameter corresponds to an empty string (""), the description file will be sought in the current directory of HFSQL data files (defined in the data model editor or by programming).
Caution: this directory must be accessible when running HCreateSubscriberReplica.
<Directory of Subscriber Replica>: Character string (with quotes)
Directory where the description file of Subscriber Replica must be created. This file is named Replica_<Identifier>.RPL.
If this parameter corresponds to an empty string (""), the description file will be created in the current directory of HFSQL data files (defined in the data model editor or by programming).
<Identifier>: Optional integer or character string
Identifier of the subscriber replica. This identifier will be used by HCreateMoveableReplica.
If this parameter corresponds to an empty string (""), an identifier is automatically returned by the function. A WLanguage error occurs if the specified identifier already exists.
<Size of Range of Identifiers>: Optional integer
Size of the range of numbers reserved for the automatic identifiers for this replica. These identifiers will be used for all the new records created by this replica. If this parameter is not specified, the size of the range of reserved identifiers is set to 1 billion. If this parameter is set to 0, no range is reserved for the automatic identifiers.
Remarks
WINDEVWEBDEV - Server codeAjaxUser code (UMC)HFSQLHyper File 5.5

Logged replication: Directory for creating the files required by the replication and by the log process

The logged replication is closely linked to the log process. The log process is automatically enabled when the 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 by programming?
Directory of data filesDirectory of the executable.
  • 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.
Note: To modify the directory for one of the data 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 requested directory in HCreateMasterReplica and HCreateSubscriberReplica.
Directory of files for log processJNL sub-directory 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.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230rpl.dll
Windows Mobile wp230rpl.dll
Linux wd230rpl.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment