ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Enabling and disabling a filter
  • Number of possible active filters
  • Operating mode in OLE DB
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Enables the filter that was previously created for the specified data file (view or query). This filter was created by HFilter and disabled by HDeactivateFilter. HActivateFilter has no effect if no filter was declared.
This function can be used with the data files, HFSQL views or queries.
Example
// Declare the filter: select customers
// between 20 and 60 years old
HFilter(Customer, Age_Customer, 20, 60)
...
HDeactivateFilter(Customer) // Disabled filter
...
// Browse the data file with a filter on age
// Process the customers who are between 20 and 60 years old
// (ProcessCustomer2060 procedure)
HActivateFilter(Customer)
HReadFirst(Customer, Age_Customer)
WHILE HFound(Customer) = True
ProcessCustomer2060()
HReadNext(Customer, Age_Customer)
END
Syntax
<Result> = HActivateFilter([<Data file>])
<Result>: Boolean
  • True if the filter is enabled,
  • False if an error occurred (file or item not found).
<Data file>: Optional character string
Name of data file, HFSQL view or query used.
Remarks

Enabling and disabling a filter

The filter is enabled once it has been declared (HFilter). The filter can be disabled by HDeactivateFilter.

Number of possible active filters

A single filter can be enabled at a time for a specific data file.
WINDEVWEBDEV - Server codeReports and QueriesWindowsOLE DB

Operating mode in OLE DB

If HActivateFilter is used when navigating through a data file, the navigation is stopped. To take the filter into account, you must navigate through the data file again with HReadFirst/HFirst or HReadLast/HLast.
The current position and all the stored positions are lost. The position will be restored according to the value of best item.
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/06/2023

Send a report | Local help