AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Example: Describing a data file programmatically
HDescribeFullTextIndex (Example)
Example: Describing a data file programmatically
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC) The following example shows how to programmatically describe a data file with its links, items, full-text indexes, etc.
AFile is File Description
AnItem is Item Description
MyFullTextIndex is FullTextIndex Description
CUSTOMER is Data Source
 
// Describe the "CUSTOMER" file
AFile.Name = "CUSTOMER"
AFile.Type = hFileNormal
AFile.FicEncryption = hEncryptionStandard
 
// Description of the "LASTNAME" item
AnItem.Name = "LASTNAME"
AnItem.Type = hItemText
AnItem.Size = 40
AnItem.KeyType = hDuplicatesKey
HDescribeItem(AFile, AnItem)
 
// Describe the "FIRSTNAME" item
AnItem.Name = "FIRSTNAME"
AnItem.Type = hItemText
AnItem.Size = 40
HDescribeItem(AFile, AnItem)
 
// Describe the full-text index
MyFullTextIndex.MinimumLength = 4
MyFullTextIndex.Name = "MyFullTextIndex"
MyFullTextIndex.Items = "LASTNAME+FIRSTNAME"
MyFullTextIndex.AccentSensitive = True
MyFullTextIndex.CaseSensitive = False
HDescribeFullTextIndex(AFile, MyFullTextIndex)
 
// Validate the file description
HDescribeFile(AFile)
// Create the Customer file (recognized because declared as data source)
HCreation(CUSTOMER)
// Create a record
CUSTOMER.LASTNAME = "Doe"
CUSTOMER.FIRSTNAME = "Andrew"
HAdd(CUSTOMER)
// Create a record
CUSTOMER.LASTNAME = "Doe"
CUSTOMER.FIRSTNAME = "Vince"
HAdd(CUSTOMER)
Versión mínima requerida
  • Versión 14
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 20/07/2023

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