PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Password
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Running a query and handling the result in WLanguage
Overview
The selection of records performed by query is not necessarily displayed in a report, in a window, ... This selection can also be used in programming.
Most of the HFSQL functions (browse, search, read, ...) can be used both on data files and on the query result. To use these functions on a query, the query must be run beforehand (HExecuteQuery).
For example, the Customer34 query selects all the customers whose zip code starts with 34. The PrintCustomer procedure is used to print a proforma invoice for each customer. The following code is used to browse the result of the Customer34 query and to print an invoice for all the selected customers.
// Run the query
ResExecute = HExecuteQuery(Customer34)
// Error while running the query?
IF ResExecute = True THEN
// Browse the result of the query
FOR EACH Customer34
    // Print the invoice for each record
PrintCustomer(Customer34.CustomerLName, Customer34.CustomerFName, ...
Customer34.CustomerAddress, Customer34.CustomerZipCode, ...
Customer34.CustomerCity)
END
ELSE
 // Display the error message
 Error("The query was not run.")
END
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Password
  • Analysis password: If the query is associated with an analysis protected by password at run time, this password must be specified when opening the analysis (HOpenAnalysis) in the initialization process of the project.
  • File password: If the query is based on one or more password-protected files, these passwords must be specified via HPass before running the query (HExecuteQuery).
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment