Subject | [IBO] Re: TIBOquery and FilterRecord |
---|---|
Author | rlssv |
Post date | 2005-02-08T14:01:08Z |
> What is FilterRecord?Sorry it's ONfilterrecord event (Tdataset):
>
> Helen
Occurs each time a different record in the dataset becomes the active
record and filtering is enabled.
Delphi syntax:
property OnFilterRecord: TFilterRecordEvent;
C++ syntax:
__property TFilterRecordEvent OnFilterRecord = {read=FOnFilterRecord,
write=SetOnFilterRecord};
Description
Write an OnFilterRecord event handler to specify for each record in a
dataset whether it should be visible to the application. To indicate
that a record passes the filter condition, the OnFilterRecord event
handler must set the Accept parameter to true. To exclude a record,
set the Accept parameter to false. Most TDataSet descendants (such as
ADO datasets or BDE-based datasets) initialize Accept to true before
calling the OnFilterRecord event handler.
Warning: Do not supply an OnFilterRecord event handler to a
unidirectional dataset. Unidirectional datasets do not support
filters, and assigning an OnFilterRecord event handler causes the
dataset to raise an exception.
Filtering is enabled if the Filtered property is true. When an
application is processing a filter, the State property for the
dataset is dsFilter.
Use an OnFilterRecord event handler to filter records using a
criterion that can't be implemented using the Filter property. For
example, using the Filter property, field comparisons are not
supported against local tables (Paradox, dBASE, Access, FoxPro), but
an OnFilterRecord event handler can implement any criterion at all.
Tip: Be sure that any interactions between the Filter property and
the OnFilterRecord event handler do not result in an empty filter set
when they are used simultaneously in an application.