AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Management of duplicates enabled
  • Generalizing the check for duplicates
  • Disabling the check for duplicates
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
Enables or disables the management of duplicates on a unique key.
Remarks:
  • The management of duplicates is enabled by default.
  • This function is not available on databases accessed by OLE DB or by Native Connectors (also called Native Accesses).
Ejemplo
// Désactive la gestion des doublons sur le fichier de données Client pour la clé "Nom"
Client.GèreDoublon(Nom, False)
Sintaxis
<Result> = <Source>.SetDuplicates([<Key item>, ] <Activation>)
<Result>: Booleano
Former management mode of duplicates (before the call to <Source>.SetDuplicates):
  • True if the management of duplicates was enabled,
  • False if the management of duplicates was disabled (or if the specified key is a key with duplicates).
If <Key item> = "*", <Result> is set to True if the check for duplicates was enabled for at least one item in the former management mode of duplicates.
<Source>: Tipo de fuente especificada
Name of the data file used.
<Key item>: Cadena de caracteres opcional
Name of unique key item used.
If this parameter is not specified or if it corresponds to "*", the management of duplicates is taken into account for all the key items in the specified data file.
<Activation>: Booleano
Management mode:
  • True if the management of duplicates must be enabled on the item,
  • False if this management must be disabled.
Observaciones

Management of duplicates enabled

If the management of duplicates is enabled on a key defined as unique key, the uniqueness is automatically checked whenever a record is added or modified in the data file.
Therefore, if the uniqueness is not checked during an addition (<Source>.Add) or a modification (<Source>.Modify), the record is not added/modified, the addition/modification function returns an error and HErrorDuplicates returns True.
Note: Only functions <Source>.Add and <Source>.Modify can generate a duplicate error..

Generalizing the check for duplicates

To generalize the management mode of duplicates to all the items found in a data file, use the meta-character "*".
For example:
<Data file>.SetDuplicates("*", <Activation>)

Disabling the check for duplicates

Disabling the check for duplicates means the possibility not to comply with the uniqueness rules specified during the description of the data files in the data model editor. Deactivating the duplicate test is therefore not an insignificant operation: it must be used wisely.
Componente: wd300hf.dll
Versión mínima requerida
  • Versión 25
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 26/09/2024

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