|
|
|
|
|
- Properties specific to link descriptions
- How to describe data files programmatically?
- Handling the links of a data file described through programming
Link Description (Variable type) In french: Description de Liaison (Type de variable)
Available only with this kind of connection
A Link Description variable is used to describe a link between two data files through programming. 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 "Link Description" variable is reinitialized and can be used to describe another link through programming.
Remark: To add a relationship to an HFSQL Client/Server database, use HAddLink.
MyLink is Link Description MyLink1, MyLink2 are Link Descriptions // Describe and validate City and Customer data files ... Â // Describe the "LIVES" link MyLink is Link Description MyLink.Name = "LIVES" MyLink.SourceFile = "CITY" MyLink.LinkedFile = "CUSTOMER" MyLink.SourceKey = "CITYNAME" MyLink.LinkedKey = "CUSTCITY" // Default link (0-1, 0-1) Â // Validate the description of the "LIVES" link HDescribeLink(MyLink) 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 "Link Description" variable to be declared.Remark: The a and an keywords are optional: they provide better readability. To describe a "Link Description" variable: Use the WLanguage properties specific to link descriptions. For more details, see remarks. To validate the description of a "Link Description" variable: Use the HDescribeLink function. Remarks Properties specific to link descriptions The following properties are specific to link descriptions: Remark: The properties written in bold followed by a star must necessarily be initialized when a link is described by programming. By default, the cardinalities of the link are (0-1) / (0-1). 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 a link is created via a "Link Description" variable, the name of this link is defined with the Name property. 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 Extern keyword. This link can now be handled by its name in the code editor. For example: MyLink is Link Description ... MyLink.Name = "LIVES" ... HDescribeLink("LIVES") ... EXTERN LIVES ... Cardinality = LIVES.MaxLinkedCardinality
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|