ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / Managing replications / WLanguage functions
  • Use in direct mode
  • Opening ports
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Opens a replication in direct mode or with a replication server. This replication was defined by the replication editor (ReplicEdit).
Example
// Ouvre une réplication en mode direct
ReplicOpen("MaRéplication")
// Ouvre une réplication sur le serveur de réplication
ReplicOpen("MaRéplication", "", "ServeurReplication", "Florence", "motpasse")

// Initialise la réplication en passant le numéro du département 
// à prendre en compte
IF ReplicInfo("MaRéplication", replicInitialized) = False THEN
	ReplicInitialize("MaRéplication", 47012)
END

// Lance la synchronisation
ReplicSynchronize("MaRéplication")

// Traitement des erreurs renvoyées par les fonctions de Réplication
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 occurs. For more details on the error, 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 ("")):
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 occurs. For more details on the error, 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 ("")):
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 server IP address 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 or Secret string
Password associated with the user.
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
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: wd300rpl.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/16/2025

Send a report | Local help