AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Administrar bases de datos / HFSQL / Tipos de variables HFSQL
  • Properties specific to link descriptions
  • How to describe data files programmatically?
  • Handling the links of a data file described programmatically
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
A Link Description variable is used to describe a link between two data files programmatically. 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 programmatically.
Note To add a link to an HFSQL Client/Server database, use the HAddLink function.
Ejemplo
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)
Sintaxis

Declaring one or more link descriptions Ocultar los detalles

<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.
Note: The keywords une and des are not mandatory: they are approval words..

Describing a "Link Description" variable Ocultar los detalles

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.
Observaciones

Properties specific to link descriptions

The following properties are specific to link descriptions:
Note Properties in bold followed by an asterisk must be initialized when describing a programmed link.
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 data files programmatically?

To describe data files programmatically:
  1. Declare the variables of type "File description", "Item Description", "FullTextIndex Description" and "Link Description" (if necessary).
  2. For each data file:
  3. If necessary, describe the characteristics of the links using HFSQL properties.
  4. If necessary, validate the description of each link (HDescribeLink).

Handling the links of a data file described programmatically

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
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 25/03/2025

Señalar un error o enviar una sugerencia | Ayuda local