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
WEBDEV - Código ServidorWindows 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 IndexFullText Description
CUSTOMER is Data Source

// Describe the "Customer" data 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 data file description
HDescribeFile(AFile)
// Create the data file named Customer (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: 14/05/2025

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