ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Example: Looping through customers by name in descending order
HReadLast (Example)
Example: Looping through customers by name in descending order
WINDEVWEBDEV - Server codeReports and QueriesJavaUser code (UMC)AjaxHFSQL ClassicHFSQL Client/ServerHyper File 5.5OLE DBNative Connectors (Native Accesses) The "Customer" file is looped through using the "NAME" browse key. the iteration is performed in descending order (from last to first). If the customer is a prospect (IsCustomer = 0), it is added to the TREE_PROSPECT treeview.
// Read the last record found in Customer file
HReadLast(Customer, Name)
WHILE NOT HOut()
// Check whether the customer is a prospect
IF IsCustomer = 0 THEN
// Add the record into the TreeView control
TreeAdd(TREE_Prospect, Customer.Name)
END
// Read the previous record
HReadPrevious(Customer, Name)
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