PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Modifying a composite key
  • Managing errors
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
..Component is used to configure the different components of a composite key. 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
// Define the second component of the composite key
LastFirstName..Component[2] = MaidenName
...
// Validate the file description
HDescribeFile(Customer)
Syntax

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

<Component name> = <File name>.<Item name>..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 name> corresponds to a simple key, <Result> corresponds to the key name.
<File name>: 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 name>: 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 name>..Component[<N>] = <New component name>
<Item name>: 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.
Note: We recommend that you use ..KeyExpression to build a composite key by programming.

Managing errors

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