PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Properties specific to the link description
  • How to describe the data files through programming?
  • Handling the links of a data file described through programming
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
A variable of type description of Link is used to describe by programming a link between two data files. The description of each link is validated by HDescribeLink.
After this validation:
  • This link can be handled like any other link described in the analysis.
  • The variable of type "Link description" is reset and can be used to describe another link by programming.
Remark: To add a relationship to an HFSQL Client/Server database, use the HAddLink function.
Versions 21 and later
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Example
MaLiaison is Link Description
MaLiaison1, MaLiaison2 are Link Descriptions
// Description et validation des fichiers de données Ville et Client
...
 
// Description de la liaison "HABITE"
MaLiaison is Link Description
MaLiaison.Name = "HABITE"
MaLiaison.SourceFile = "VILLE"
MaLiaison.LinkedFile = "CLIENT"
MaLiaison.SourceKey = "NOMVILLE"
MaLiaison.LinkedKey = "VILLECLI"
// Liaison par défaut (0-1, 0-1)
 
// Validation de la description de la liaison "HABITE"
HDescribeLink(MaLiaison)
Syntax

Declaring one or more link descriptions Hide the details

<Variable name> is Link Description
<Variable name 1>, <Variable name 2> are Link Descriptions
<Variable name>:
Name of the variable of type "description de Liaison" to be declared.
Remark: The a and an keywords are optional: they provide better readability.

Describe a variable of type "description de Liaison Hide the details

To describe a variable of type "description de Liaison ":
Use the WLanguage properties specific to the link descriptions. For more details, see remarks.

To validate an description of a variable of type "description de Liaison ":
Use HDescribeLink.
Remarks

Properties specific to the link description

The following properties are specific to the link descriptions:
Remark: The properties written in bold followed by a star must necessarily be initialized when a link is described by programming.
Property nameEffect
MaxLinkedCardinalityMaximum cardinality of the linked item in a link
MinLinkedCardinalityMinimum cardinality of the linked item in a link
MaxSourceCardinalityMaximum cardinality of the source item in a link
MinSourceCardinalityMinimum cardinality of the source item in a link
LinkedKey ( * )Item of the linked file used in the link
SourceKey ( * )Item of source file used in the link
LinkedFile ( * )Name of the linked file used in the link
SourceFile ( * )Name of the source file used in the link
Name ( * )Name of the link
ModificationRuleModification rule (integrity management) used in a link
DeletionRuleDeletion rule (integrity management) used in a link

By default, the cardinalities of the link are (0-1) / (0-1).

How to describe the data files through programming?

To describe the data files through programming, you must:
  1. Declare variables of type "File description", "Item Description", "FullTextIndex description" and "description de Liaison" (if necessary).
  2. For each data file:
  3. Describe if necessary the characteristics of the links thanks to HFSQL properties.
  4. If necessary, validate the description of each link (HDescribeLink).

Handling the links of a data file described through programming

When a link is created in the data model editor, the name of the link is automatically recognized by the compiler.
When creating a link using a variable of type "Link description", the name of this link is defined thanks to the Property Name. This name is not automatically recognized by the compiler. Using this name to identify the link generates a compilation error.
In order for the name of the link created through programming to be recognized by the compiler, this name must be declared via the External keyword. This link can now be handled by its name in the code editor.
For example:
MaLiaison is Link Description
...
MaLiaison.Name = "HABITE"
...
HDescribeLink("HABITE")
...
EXTERN HABITE
...
Cardinalité = HABITE.CardinalitéReliéeMax
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment