ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Attention : This is version 26 of this documentation page. This feature may have been changed or removed in a higher version.
This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL functions / Compatible Hyper File functions
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
HDescribeKey (Function)
In french: HDécritClé
Warning
HDescribeKey is kept for backward compatibility (this function will still be supported in the forthcoming version).
From version 8, to describe a key, you must:
  1. Declare an item object.
  2. Define all the properties of the item with the HFSQL properties.
  3. Use HDescribeItem to validate the item creation.
Below is the documentation of HDescribeKey, available in WINDEV 5.5
 
Purpose
Describe a simple or composite key in a temporary data file in Hyper File format
Syntax
HDwrittenKey(<LogicalNameHF File>,<KeyName> [,<KeyList> [,<Double>]])
  • <LogicalNameHFFile> is a character string containing the name of the logical data file
  • <NameKeyItem> is a character string containing the name of the key (up to 100 characters)
  • <KeyItemList> is an optional character string containing the list of items found in the key.
    • For a composite key, the items are separated by a comma in <ListKeyItem>: <NameItem1>, <NameItem2>, ...
    • For a simple key, <Item List> contains the name of the key.
  • <Duplicates> is an optional boolean used to find out whether the key is unique or multiple:
    • set to True for multiple key (with duplicates)
    • set to False for a unique key
    By default, <Duplicate> is set to True.
Details
The key is built according to the parameters passed to HDescribeKey.
If <ListKeyItem> is not specified, <NameKeyItem> must be a file item
If several keys are specified, the simple keys must be defined before the composite keys. The error HF 508 occurs if a composite key is described before a simple key.
<Duplicates> is set to True by default. Therefore, if <Duplicate> is not specified, the key is a multiple key.
Notes
  • The data file must have been described by HDescribeFile.
  • The items included in the key must have been described beforehand by HDescribeItem.
  • To describe a unique simple key, the syntax is as follows:
    HDescribeKey(<FileName>,<Key_Name>, <Key Name>, False)
  • The function HDescribeKey cannot be used to describe an a data file key that was created with the description editor of HEX@ data.
  • HDescribeKey does not exist in external language.
  • HDescribeKey must not be called after one of the following functions used on the same data file: HOpen, HCreation or HCreationIfNotFound.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/01/2021

Send a report | Local help