PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Example: Describing a data file by programming
HDescribeFullTextIndex (Example)
Example: Describing a data file by programming
WINDEVWindowsUser code (UMC) The following example is used to describe a data file by programming with its links, items, full-text indexes, ...
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..FicCryptMethod = hCryptStandard
 
// Describe 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..AccentuationSensitive = True
MyFullTextIndex..CaseSensitive = False
HDescribeFullTextIndex(AFile, MyFullTextIndex)
 
// Validates 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)
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment