ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Example: Describing a data file programmatically
HDescribeFullTextIndex (Example)
Example: Describing a data file programmatically
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (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 IndexFullText 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)
HCréation(CUSTOMER)
// Create a record
CUSTOMER.LASTNAME = "Doe"
CUSTOMER.FIRSTNAME = "Andrew"
HAdd(CUSTOMER)
// Create a record
CUSTOMER.LASTNAME = "Doe"
CUSTOMER.FIRSTNAME = "Vince"
HAdd(CUSTOMER)
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/20/2023

Send a report | Local help