RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TIBTable.Filter Property

Specifies rows in a dataset that meet the filter conditions.

Pascal
property Filter;
C++
__property Filter;

Use the Filter property to restrict the rows in the dataset to those that meet the filter conditions. The syntax for Filter is the same as the search condition that appears after a WHERE clause in a Select statement. For example, to view only those records where the value in the Country field contains 'France' or 'Fiji': 

Country = 'France' or Country = 'Fiji' 

You can use standard SQL wildcards such as percent (%) and underscore (_) in the condition when you use the LIKE operator. The following filter condition retrieves all Countries beginning with 'F':

Country LIKE 'F%'

To view rows that have a NULL value in the Country column and Contact_Name is not NULL, use the IS operator:

Country is NULL and Contact_Name is not NULL

You can also use complex expressions in filter clauses. The following example retrieves rows containing Country values that use Francs as currency.

Country IN (SELECT Country from Country where Currency = '_Franc')

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!