PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Implementation
  • Necessary conditions
  • The different steps
  • Installing the replication server
  • Defining the replication
  • Programming the replication
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Replication of mobile data (Android or iOS)
HFSQLHFSQL 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 a SQLite database and a 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 a HFSQL database (Classic or Client/Server).
  • The mobile database (Subscriber) must be a 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: The date and time time must be identical on the server and on the Android/iOS devices. The internal dates (the ones used by the replication in the HFSQL files) are in UTC.
  • The setup pack of the replication server is supplied with WINDEV, WEBDEV and WINDEV Mobile. It is found in the \Install\WServerR\ directory of the setup folder of products.
  • If you own WEBDEV sites, the replication server and the WEBDEV Application Server can be installed on the same server.
Caution: Specific rights must be granted on the setup directory of replication server. 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:
Versions 12 and later
ReplicInfo
New in version 12
ReplicInfo
ReplicInfo
Returns information about a replication.
Versions 12 and later
ReplicInitialize
New in version 12
ReplicInitialize
ReplicInitialize
Initializes or reinitializes a replication defined by the replication editor (ReplicEdit).
Versions 12 and later
ReplicOpen
New in version 12
ReplicOpen
ReplicOpen
Opens a replication in direct mode or with a replication server.
Versions 12 and later
ReplicSynchronize
New in version 12
ReplicSynchronize
ReplicSynchronize
Synchronizes the data corresponding to a replication.
Note: In the code of the Android (or iOS) project, don't forget to configure the connection to the local database (HFSQL Classic file on the mobile device).
Minimum required version
  • Version 19
Comments
Click [Add] to post a comment