ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / Managing replications / WLanguage functions
  • Use in direct mode
  • Opening ports
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
Opens a replication in direct mode or with a replication server. This replication was defined by the replication editor (ReplicEdit).
Example
// Open a replication in direct mode
ReplicOpen("MyReplication")
// Opens a replication on the replication server
ReplicOpen("MyReplication", "", "ReplicationServer", "Flora", "password")
 
// Initialize the replication by passing the zip code
// to take into account
IF RéplicInfo("MyReplication", replicInitialized) = False THEN
ReplicInitialize("MyReplication", 47012)
END
 
// Starts the synchronization
ReplicSynchronize("MyReplication")
 
// Process errors returned by Replication functions
CASE ERROR:
Error(ErrorInfo(errFullDetails))
RETURN
Syntax

Opening a replication in direct mode Hide the details

<Result> = ReplicOpen(<Replication> [, <Working directory>])
<Result>: Boolean
  • True if the replication was opened,
  • False if an error occurred. For more details about the problem, use ErrorInfo.
<Replication>: Character string
Name of replication file to open (file with a ".wer" extension), with no path and no extension. This file was created by the replication editor (ReplicEdit). This file must be found beside the executable.
<Working directory>: Optional character string
Directory where the replication will be performed (creation of files required by the replication). By default (or if this parameter corresponds to an empty string ("")):
WINDEV this directory corresponds to the directory of the application executable (directory returned by fExeDir).
iPhone/iPad this directory corresponds to the "<,Application_Home>/Documents/" directory.
Android this directory corresponds to "<data dir>/databases/<replication-name>".

Opening a replication with a replication server Hide the details

<Result> = ReplicOpen(<Replication> , <Working directory> , <Server address> , <User> , <Password>)
<Result>: Boolean
  • True if the connection was established with the replication server,
  • False if an error occurred. For more details about the problem, use ErrorInfo.
<Replication>: Character string
Name of replication to open. This name corresponds to the publication name of replication.
<Working directory>: Character string
Directory where the replication will be performed (creation of files required by the replication). By default (or if this parameter corresponds to an empty string ("")):
WINDEV this directory corresponds to the directory of the application executable (directory returned by fExeDir).
iPhone/iPad this directory corresponds to the "<,Application_Home>/Documents/" directory.
Android this directory corresponds to "<data dir>/databases/<replication-name>".
<Server address>: Character string
Address of the replication server. This address can correspond to:
  • the IP address of server in xxx.xxx.xxx.xxx format
  • the name of server.
<User>: Character string
User name. This name corresponds to an account created on the replication server.
<Password>: Character string
Password associated with the user.
Remarks

Use in direct mode

The call to this function is optional in direct mode because it is automatically called by the other replication functions (with the default parameters) if it was not called beforehand.

Opening ports

This function uses the replication server that uses the Web server on which it is installed. Therefore, port 80 must be opened on the replication server.
Component: wd290rpl.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/06/2023

Send a report | Local help