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.
  • Modifying a composite key
  • Error management
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Component (Property)
In french: Composante
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
The Property Component allows the different components of a compound key to be parameterized. You can:
  • Find out the Nth component of a composite key (defined in the data model editor or by programming).
  • Define the Nth component of a composite key (Item description variable).
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store apps mode.
Universal Windows 10 App This property is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Example
// Définir la deuxième composante de la clé composée
NomPrénom.Composante[2] = NomMarital
...
// Valide la description du fichier de données
HDescribeFile(Client)
Syntax

Finding out the Nth component of a composite key Hide the details

<Component name> = <Data file>.<Item>.Component[<N>]
<Component name>: Character string (without quotes)
Name of the item corresponding to the sought component of the composite key.
If N = 1 and if <Item> corresponds to a simple key, <Result> corresponds to the key name.
<Data file>: Character string (with or without quotes)
Name of data file used. This name was defined in the data model editor or by the File description type.
<Item>: Character string (with or without quotes)
Name of the key item used. This name was defined in the data model editor or by the Item description type.
<N>: Integer
Number of the component whose name is requested. The number of elements found in a composite key is returned by NbComponent.

Defining the Nth component of a composite key Hide the details

<Item>.Component[<N>] = <New component name>
<Item>: Character string (with or without quotes)
Name of the key item used. This name was defined by the Item description type.
<N>: Integer
Number of the component that must be modified or added. The number of elements found in a composite key is returned by NbComponent.
<New component name>: Character string (without quotes)
Name of the item that must be used as component of the composite key.
Remarks

Modifying a composite key

Modifying a composite key may allow you to add new components to the composite key during its description by programming. The different components must be numbered in ascending order and no "empty" slot must be found (for example, you cannot go from component 4 to component 6). Otherwise, a WLanguage error occurs.
Remark: It is advisable to use the Property KeyExpression to build a compound key by programming.

Error management

A fatal error (WLanguage error) occurs in the following cases:
  • requested component greater than the number of components found in the key,
  • writing a component that does not immediately follow the last component of the composite key.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment