PC SOFT

WINDEV的在线文档

  • Overview
  • Password
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

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 (H执行查询).

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
ResExecuteH执行查询Customer34
// Error while running the query?
如果ResExecute,那么
// Browse the result of the query
对于每个Customer34
// Print an invoice for each record
PrintCustomerCustomer34.CustomerLNameCustomer34.CustomerFName,...
Customer34.CustomerAddressCustomer34.CustomerZipCode,...
Customer34.CustomerCity
结束
否则
// Display the error message
错误"The query was not run."
结束

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 (H打开数据模型) 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 by H密码 before running the query (H执行查询).