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.
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
HDuplicates (Function)
In french: HDoublon
Warning
HDuplicates is kept for backward compatibility (this function will still be supported in the forthcoming version).
From version 8, this function was replaced by:
  • an automatic management of duplicates, allowing the user to enter a different value for the item generating a duplicate error.
  • HErrorDuplicates.
Below is the documentation of HDuplicates, available in WINDEV 5.5
 
Purpose
Checking the uniqueness of a key.
Syntax
<Result> = HDuplicates()
  • <Result> is a boolean corresponding to the value of H.Duplicates.
Details
When running HAdd, HModify or TableSave, if the modified or added key is not unique, H.Duplicates is set to True and the function is not run.
Therefore, to find out whether if a record was modified or added, you must check HDuplicates.
HDuplicates returns H.Duplicates.
HDuplicates is set to True if H.Duplicates is set to True.
HDuplicates is set to False if H.Duplicates is set to False.
Notes
  • If HDuplicates is not checked while a duplicate was detected by WINDEV (when using HAdd, HModify or TableSave), the error 10 ("Duplicate on unique key") will be displayed.
    Caution: this error can occur on the user computers. Therefore, don't forget to systematically check HDuplicates whenever HAdd, HModify or TableSave is used if the data file contains unique keys.
  • If HDuplicates and HErrIntegrity must be checked, HDuplicates must be checked before HErrIntegrity.
  • If HSetDuplicatesYes is called, the management of duplicates is enabled. The management of duplicates is enabled by default.
  • Reminder: WINDEV allows you to automatically create and manage an automatic identifier. All you have to do is define it during the description of the data file.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/23/2020

Send a report | Local help