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
  • Overview
  • Implementation
  • Necessary conditions
  • Steps to follow
  • Installing the replication server
  • Defining the replication
  • Programming the replication
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Replication of mobile data (Android or iOS)
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Overview
The Assisted Universal Replication is available in Android and iOS.
This replication allows you to replicate data coming from different databases.
Android This replication mode cannot be used to perform a replication between an SQLite database and an HFSQL database.
Implementation

Necessary conditions

  • The analysis must be shared between the WINDEV and WINDEV Mobile application (Android or iOS).
  • The Master database must be an HFSQL database (Classic or Client/Server).
  • The mobile database (Subscriber) must be an HFSQL Classic database.
  • The structure of the database must be strictly identical on the two platforms.

Installing the replication server

The setup of the replication server is presented in the page named Replication server for the assisted universal replication.
Reminders/Notes
  • IMPORTANT: Date and time must be identical on server and Android/iOS terminals.. The internal dates (the ones used by the replication in the HFSQL files) are in UTC.
  • The installation package of the replication server is provided with WINDEV, WEBDEV and WINDEV Mobile. It is located in the "\Install\WDRServer" subdirectory of the IDE installation folder.
  • If you own WEBDEV websites, the replication server and the WEBDEV Application Server can be installed on the same server.
Caution: It is necessary to give specific rights to the replication server installation directory.. Read rights and execution rights must be granted to the Internet user (IUSR_Computer_name account) on this directory (and in the sub-directories).

Defining the replication

The replication is defined by ReplicEdit.
The steps for creating a replication for the Android/iOS applications are as follows:
  1. Create a replication.
  2. Add files into a replication.
  3. Publish the replication.

Programming the replication

In the Mobile application, the WLanguage functions must be used to perform the synchronization.
The wizard for publishing the replication on the replication server provides a basic code:
// Opens a replication on the replication server
ReplicOpen("replication name", "", "IP address", "login", "password")

// Initializes the replication by passing the parameters 
//IF ReplicInfo("replication name", replicInitialized) = False THEN
//	ReplicInitialize("replication name", <Parameters>)
//END

// Starts the synchronization
ReplicSynchronize("replication name")
The following functions must be used:
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.
Remark: Don't forget to set the connection to the local database (HFSQL Classic file on the mobile device) in the Android (or iOS) project code..
Minimum version required
  • Version 19
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help