PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Example 1: Simple generic search
  • Example 2: Performing a search on a composite key
  • Example 3: Seeking a customer with condition
HReadSeek (Example)
Example 1: Simple generic search
Reports and QueriesHFSQLHFSQL Client/ServerHyper File 5.5OLE DBNative Connectors (Native Accesses)
The following example is used to perform a generic search on the customer name. If the customer is found, the CustomerFound procedure is run ; if no customer is found, the UnknownCustomer procedure is run.
// Simple generic search
HReadSeek(CUSTOMER, CUSTNAME, sCustName)
IF HFound(CUSTOMER) = True THEN
CustomerFound()
ELSE
UnknownCustomer()
END
Example 2: Performing a search on a composite key
Reports and QueriesHFSQLHFSQL Client/ServerHyper File 5.5OLE DBNative Connectors (Native Accesses)
The following example is used to perform a search on a composite key (last name and first name). The customers found are deleted.
// Find the record
HReadSeek(CUSTOMER, LASTNAME_FIRSTNAME, [sLastName, sFirstName])

WHILE HFound(CUSTOMER) = True
// Deletion
HDelete(CUSTOMER)
HReadNext(CUSTOMER,LASTNAME_FIRSTNAME)
END
Example 3: Seeking a customer with condition
Reports and QueriesHFSQLHFSQL Client/ServerHyper File 5.5OLE DBNative Connectors (Native Accesses)
This example is used to find a customer whose turnover is greater than a specified value.
HReadSeek(CUSTOMER, Turnover, X)
WHILE HOut(CUSTOMER) = False
Add_Customer_List()
HReadNext(CUSTOMER)
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment