ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Example: Finding and deleting the customers with a given name
HBuildKeyValue (Example)
Example: Finding and deleting the customers with a given name
WINDEVWEBDEV - Server codeWindowsJavaUser code (UMC)AjaxHFSQL ClassicHFSQL Client/ServerStored proceduresHyper File 5.5OLE DB
The following code is used to build the value of the composite key from a specific first name and last name. An exact-match search performed in the Customer file is used to delete all the customers with a given last name and first name.
The record is deleted directly (it is not read).
// Build the value of the composite key
sSoughtVal is string = HBuildKeyValue(CUSTOMER, LASTNAME_FIRSTNAME, sLastName, sFirstName)
// Find the record
HSeekFirst(CUSTOMER, LASTNAME_FIRSTNAME, sSoughtVal)
WHILE HFound(CUSTOMER) = True
// Deletion
HDelete(CUSTOMER)
HNext(CUSTOMER, LASTNAME_FIRSTNAME)
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help