ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / Managing replications / WLanguage 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
HRplDeclareLink (Function)
In french: HRplDéclareLiaison
ODBCOLE DBNot available with these kinds of connection
Declares a (1,1) (0,n) link between two tables. Only the records found in the target table with a corresponding record in the source table (while respecting the filter of this one) will be replicated during a universal replication.
Remark: This function can be used during the universal replication only.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPad Only the universal replication is available.
Example
// Retrieve a subscriber as well as his messages
HCreateSubscriberReplica("", "", "Mr X", 0, "Messages" + CR + "Recipients")
// Filter the messages
HFilter(Recipients, Name, "X")
// Declare the link
HRplDeclareLink(Recipients, Messages, MessagesID, MessagesID)
HCreateMovableReplica("", "", rplToSubscriber)
Syntax
<Result> = HRplDeclareLink(<Name of source file> , <Name of source item> , <Name of target file> , <Name of target item>)
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred (the specified tables and items do not exist for example). HError is used to identify the error. Caution: <Result> is set to True even if the specified files/tables are not replicated.
<Name of source file>: Character string
Name of the file or table whose multiplicity is set to (1, 1).
<Name of source item>: Character string
Name of the item affected by the link in the source file.
<Name of target file>: Character string
Name of the file or table whose multiplicity is set to (0, n).
<Name of target item>: Character string
Name of the item affected by the link in the target file.
Remarks
  • The operation is taken into account only if the source table/file is specified AFTER the target table/file in the list of tables passed to HCreateSubscriberReplica.
  • The filtering performed on the second file/table is not respected.
  • As soon as a file is target of a declared link, this file is replicated via this link only.
  • If a file is the source of two links, a record will be replicated if it belongs to one of the links.
Component: wd300rpl.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/25/2024

Send a report | Local help