Recreates the description file of a subscriber replica (universal replication only
) according to the information of the master replica (.RPM and .SYN files). The master replica must be accessible (via network or UNC).
The replicated files and the range of automatic identifiers used by the initial subscriber are also used by the created subscriber.
Remark: The replication is not available when accessing a database via Remote access
// Re-create the subscriber
HRecreateSubscriberReplica("", "", "Subscriber1")
<Result> = HRecreateSubscriberReplica(<Directory of master replica> , <Directory of subscriber replica> , <Identifier> [, <Automatic modification>])
Identifier of the subscriber replica that was created, 0 if no subscriber replica was created.
<Directory of master replica>: Character string
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 files (defined in the data model editor or through programming).
Caution: this directory must be accessible when HRecreateSubscriberReplica is executed.
<Directory of subscriber replica>: Character string
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 subscriber replica. This identifier will be used by HCreateMovableReplica.
A WLanguage error occurs if the specified identifier already exists. This parameter must not correspond to an empty string ("").
<Automatic modification>: Boolean
- True to take into account the automatic data modification. In this case:
- Changes in the structure of the master database will be carried over to the subscriber database.
- The new items will be taken into account by the replication.
- False (default value). The automatic data modification performed on the master database is not carried over to the subscriber database.
- For existing replications, it is necessary to recreate a replication (as well as the subscribers) to implement this mechanism.
- This mechanism does not work if a unique key is added or deleted.
- This parameter is only available for replication between HFSQL databases (Classic or Client/Server).
Business / UI classification: Business Logic