ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / Managing replications
  • Overview
  • Functions for managing the assisted replication
  • Functions for managing the universal replication
  • Functions for managing log-based replication
  • Functions used to handle the replication of HFSQL servers
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
Overview
Different types of replication are proposed:
  • the assisted replication. This replication mode is used to easily define the records to replicate via ReplicEdit. Then, the records are replicated by ReplicSynchro. This replication mode uses the universal replication. Specific WLanguage functions are used to handle the replications.
    The assisted universal replication is available for the iOS and Android applications. For more details, see Replication of mobile data (Android or iOS).
  • the universal replication. The purpose of universal replication is to keep several databases synchronized. These databases can have different types (HFSQL, Oracle, ...). Universal replication uses a centralized model: all databases are synchronized with a master database. Then, the master database reflect the changes in the other databases. Several WLanguage functions are used to implement the universal replication.
  • log-based replication. Log-based replication uses logs to keep the remote HFSQL databases up to date. Several WLanguage functions are used to implement log-based replication. You can also use WDReplic.
  • the replication between HFSQL servers. This replication mode is used to update the data found on HFSQL servers linked 2 by 2.
Functions for managing the assisted replication
The following functions are used to implement the assisted universal replication (replication created from ReplicEdit):
ReplicDeleteSubscriptionDeletes the subscription of a replication on the replication server.
ReplicInfoReturns information about a replication.
ReplicInitializeInitializes or reinitializes a replication defined by the replication editor (ReplicEdit).
ReplicOpenOpens a replication in direct mode or with a replication server.
ReplicSynchronizeSynchronizes the data corresponding to a replication.
Functions for managing the universal replication
The following functions are used to implement a universal replication. For more details, see Implementing universal replication.
HCreateMasterReplicaCreates the description file of a Master Replica (logged replication or universal replication).
HCreateMovableReplicaCreates a movable replication.
HCreateSubscriberReplicaCreates the description file of a subscriber replica.
HRecreateSubscriberReplicaRecreates the subscriber replica description file (universal replication only) based on the information of the master replica (.rpm and .syn files).
HRplDeclareLinkDeclares a (1, 1) (0, n) link between two tables.
HRplFilterProcedureDefines the WLanguage procedure that will be called whenever a replication operation is performed on a specific file.
HRplManageFileDefines the options used for the universal replication of a file:
  • the replication direction.
  • the management mode of conflicts.
HRplManageItemSpecifies the replication options for an item: the item can be replicated or not.
HRplPassSets the passwords used to protect the universal replication files.
HSetReplicationTemporarily disables (or re-enables) the replication.
HSynchronizeReplicaSynchronizes the master replica and the subscriber replica: the operations performed on one of the replicas are transferred into the other replica.
Functions for managing log-based replication
The following functions are used to implement log-based replication. For more details, see Programming a log-based replication.
HChangeRplDirChanges the location of the subscriber replica description ("*.rpl" file).
HCreateMasterReplicaCreates the description file of a Master Replica (logged replication or universal replication).
HCreateMovableReplicaCreates a movable replication.
HCreateSubscriberReplicaCreates the description file of a subscriber replica.
HInfoReplicaReturns information about the specified replica.
HInitSubscriberInitializes the range of automatic identifiers for the description file of subscriber replica (".rpl" extension).
HSetReplicationTemporarily disables (or re-enables) the replication.
HSynchronizeReplicaSynchronizes the master replica and the subscriber replica: the operations performed on one of the replicas are transferred into the other replica.
Functions used to handle the replication of HFSQL servers
The functions below are used to implement a replication between 2 HFSQL servers. For more details, see Programming a replication of HFSQL servers.
HRSAddConfigAdds a replication between two HFSQL server onto the master server.
HRSDeleteConfigDeletes a replication between two HFSQL servers.
HRSExecuteImmediately runs a recurring replication between HFSQL servers: the replication is triggered before the scheduling.
HRSIgnoreErrorIgnores errors so that replication between HFSQL servers can continue to run.
HRSInfoReads the replication configuration for an HFSQL server that takes part in one or more replications.
HRSInitConfigures an HFSQL server in order for this server to be a master server or a subscriber server for a replication between HFSQL servers.
HRSListConfigLists the replications available on a master HFSQL server.
HRSModifyConfigModifies some parameters of an existing replication between two HFSQL servers.
HRSWaitForDataProcessWaits for:
  • the replication data on the master server to be sent to the subscriber server.
  • the replication data received on the subscriber server to be entirely applied.
The replication between HFSQL servers is also using the following type of data:
hRSConfigThe hRSConfig type is used to define the advanced characteristics of a replication between 2 HFSQL servers.
Related Examples:
WD Universal Replication Training (WINDEV): WD Universal Replication
[ + ] This examples explains how to use the universal replication to synchronize data of different sites.
The universal replication is used to synchronize the data of a site (master site) with the same data of one or more replicated sites (subscriber sites). The data structures are identical on each site but they can be exploited via different data managers. HFSQL Classic and Access will be used in this example.
The example presents the processes that must be included in your applications to allow the user, via a simple action (menu, button, ...), to:
- create a master replica,
- create one or more subscriber replicas,
- see and modify the data of these replicas,
- export the created or modified data to a site (portable replica),
- import the created or modified data into another site...
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/06/2024

Send a report | Local help