TurboDB VCL Component Library



Previous  Top  Next

Contains an expression used for filtering the records of the data set.

Delphi syntax:

property Filter: string;

C++ syntax:

__property System::UnicodeString Filter;


TurboDB supports two kinds of filters, conditional filters and keyword filters. Conditional filters work with a logical condition and show all records satisfying this condition. Conditions are described in Search-Conditions. The FilterOptions determine, how the filter is applied. With the FilterMethod property you can determine, which mechanism is used for filtering.

TurboDB allows any valid TurboSQL search-condition as the filter expression here, not just the very limited set that is supported by the BDE components. The search-condition is interpreted according to the rules of VCL data sets:

Floating numbers can be formatted either in the standard format with a decimal point or in the current local format (e.g. with a decimal comma).
Time, date and timestamp values refer to the current local settings on the computer. You can use the native formats without quotes for time, date and timestamp literals to create locale independent filter expressions.
The jokers for string comparisons with like are % and _ as in SQL.

In Delphi 2007 and before, you can use the FilterW property to set a Unicode filter expression.

The TTdbTable component allows also for keyword filters, which need a full-text index to work. Keyword filters are not assigned to the Filter property but to the WordFilter property.

See also

FilterOptions property
FilterMethod property