ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
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
HInfoReplica (Function)
In french: HInfoReplica
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Returns information about the specified replica. This function is used to find out whether the database contains data to replicate.
Caution: This function cannot be used with the universal replication. This function can be used with the "log-based replication" only.
Example
// Gray the button if there is no data to synchronize
IF HInfoRéplica("", rplMasterIsUpToDate) = True THEN
BTN_SYNCHRO..State = Grayed
END
WINDEVWEBDEV - Server codeReports and QueriesUser code (UMC)HFSQL ClassicHFSQL Client/ServerHyper File 5.5
// If the master was not synchronized for more than 7 days
IF HInfoRéplica("", rplMasterIsUpToDate, "PARIS") = False THEN
NbDays is int
NbDays = HInfoRéplica("", rplDateSynchroToMaster, "PARIS")/(24*60*60)
IF NbDays > 7 THEN
 Info("PARIS was not updated since " + ...
NbDays + " days.")
END
END
Syntax
<Result> = HInfoReplica(<Full path of replica file> , <Sought information> [, <Identifier of subscriber replica>])
<Result>: Type depending on the type of information
Requested information.
<Full path of replica file>: Character string
Full path of the replica file (".RPL" or ".RPM" file) corresponding to the replica to analyze. For a movable replica, corresponds to the path of the "*.WDZ" file.
If this parameter corresponds to an empty string (""), the replica is sought in the current directory.
<Sought information>: Constant
The information differs according to the type of replica:
  • Master replica:
    rplDateSynchroFromSubscriber<Result> is a character string in "YYYYMMDD" format.
    Date of the last synchronization toward the master database.
    rplDateSynchroToSubscriber<Result> is a character string in "YYYYMMDD" format.
    Date of the last synchronization toward the subscriber database.
    rplNumMovableReplicaGeneration number of last movable replica generated for the subscriber replica whose identifier is <Identifier of subscriber replica>.
    rplSubscriberIsUpToDate<Result> is a boolean.
    • True if no data must be sent,
    • False if data must be sent to a subscriber computer.
  • Subscriber replica:
    rplDateSynchroFromMaster<Result> is a character string in "YYYYMMDD" format.
    Date of the last synchronization from the master database.
    rplDateSynchroToMaster<Result> is a character string in "YYYYMMDD" format.
    Date of the last synchronization toward the master database.
    rplMasterIsUpToDate<Result> is a boolean.
    • True if no data must be sent,
    • False if data must be sent to a master computer.
    rplNumMovableReplicaGeneration number of last movable replica that was generated. This number is incremented whenever HCreateMovableReplica is called.
  • Movable replica:
    rplNumMovableReplicaGeneration number of last movable replica that was generated. This number is incremented whenever HCreateMovableReplica is called.
<Identifier of subscriber replica>: Optional character string or optional integer
Identifies a subscriber replica. This parameter is taken into account if <Full path of replica file> corresponds to a master replica. This parameter can be:
Business / UI classification: Business Logic
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/06/2023

Send a report | Local help