AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Automatic management of composite keys
  • Filter and filtered iteration
  • Enabling/Disabling a filter
  • Data file not in HFSQL format
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
Defines and enables a filter used to find the exact value of a string item. This filter can be used on a data file, a view or a query.
After its execution, the most common cases are as follows:
  • the filter cannot be created: the function <Source>.FilterIdentical FUNCTION function returns an empty string (""). HError returns the error identifier.
  • the filter is created: the <Source>.FilterIdentical function returns the optimal route key to be used to route the data file, view or query.
Ejemplo
// Sélection de tous les clients ayant pour nom Archambault 
// et pour prénom Corentin
CléParcours is string
CléParcours = Client.FiltreIdentique(NomPrénom, "Archambault", "Corentin")
Client.LitPremier(CléParcours)
WHILE NOT Client.EnDehors()
	Trace(Client.NomClient, Client.Ville)
	Client.LitSuivant(CléParcours)
END
// Désactive le filtre
Client.DésactiveFiltre()
Sintaxis
<Result> = <Source>.FilterIdentical(<Key item> , <Value for key component 1> [, <Value for key component 2> [... [, <Value for key component N>]]])
<Result>: Cadena de caracteres
Browse item. Corresponds to:
  • the search key of data file if the filter is enabled.
  • an empty string ("") if the filter cannot be implemented.
<Source>: Tipo de fuente especificada
Name of the HFSQL data file, view or query used.
<Key item>: Cadena de caracteres
Name of key item onto which the filter will be applied. This item can be a simple key (string) or a composite key. Warning: this parameter must only contain letters, underlined characters or numbers.. Otherwise, the name must be enclosed in quotes.
<Value for key component 1>: Tipo de cada componente de la clave de búsqueda
Value sought for the first component of composite key.
The type of this parameter must correspond to the type of key item component on which the filter is defined.
<Value for key component 2>: Tipo de cada componente de la clave de búsqueda
Value sought for the second component of the composite key.
The type of this parameter must correspond to the type of key item component on which the filter is defined.
<Value for key component N>: Tipo de cada componente de la clave de búsqueda
Value sought for component N of composite key .
The type of this parameter must correspond to the type of key item component on which the filter is defined.
Observaciones

Automatic management of composite keys

<Source>.FilterIdentical automatically manages the filters on the simple keys and on the composite keys.
Example: Using <Source>.FilterIdentical with a simple key:
Res = Client.FiltreIdentique(Nom, "Archambault")
// Sélection du client ayant pour nom Archambault
Example: Using <Source>.FilterIdentical with a composite key
Res = Client.FiltreIdentique(NomPrénom, "Archambault", "Corentin")
// Sélection de tous les clients ayant pour nom Archambault et 
// pour prénom par Corentin
This line of code is equivalent to:
Client.Filtre(NomPrénom, ...
	Client.ConstruitValClé(NomPrénom, "Archambault", "Corentin"), ...   
	Client.ConstruitValClé(NomPrénom, "Archambault", "Corentin")

Filter and filtered iteration

After the call to <Source>.FilterIdentical, the iteration must be performed on the item returned by <Source>.FilterIdentical. The filter will be ignored if another item is used to loop through the data file.
When a filter is defined and enabled on a data file (view or query), all records read correspond to the filter. If there are no more records matching the filter during browsing:
  • <Source>.Out returns True.
  • the current record corresponds to the last record read with the filter.
For example:
On a filtered data file, after the function:the current record is:
<Source>.ReadFirstthe first file record corresponding to the filter.
<Source>.ReadLastthe last file record corresponding to the filter.
<Source>.ReadNext (or <Source>.Forward)the next record (or the next nth record) corresponding to the filter.
<Source>.ReadPrevious (or <Source>.Backward)the previous record (or the previous nth record) corresponding to the filter.

Enabling/Disabling a filter

  • <Source>.DeactivateFilter is used to disable a filter.
  • <Source>.ActivateFilter is used to re-enable a filter.
  • The filter is deleted when the data file (query or view) is closed (<Fuente>.Close or HOpenAnalysis for example).
  • A single filter can exist at a given time on a data file (query or view). If the <Source>.FilterIdentical is used several times, only the last filter will be taken into account: the previous filter(s) will be deleted. Similarly, if several filters are used (HFilter* functions), only the last filter will be taken into account.
WINDEVWEBDEV - Código ServidorReportes y ConsultasAndroidWidget Android Código de Usuario (UMC)AjaxProcedimientos almacenadosOLE DBConectores Nativos

Data file not in HFSQL format

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: 22/11/2024

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