|
<< Click to Display Table of Contents >> Delphi Examples: DbiDropFilter |
![]() ![]()
|
Deactivate and drop a filter on the specified table. This example uses the following input:
fDbiDropFilter(Table1, hFilter);
The procedure is defined as:
procedure fDbiDropFilter(Table: TTable; var hFilter: hDBIFilter);
var
Props: CURProps;
begin
Check(DbiGetCursorProps(Table.Handle, Props));
// Check to see if there are any active filters on the cursor
if (Props.iFilters = 0) then
raise EDatabaseError.Create('There are no active filters on the specified cursor');
if( hFilter <> nil) then begin
// Deactivate and drop filter
Check(DbiDeactivateFilter(Table.Handle, hFilter));
Check(DbiDropFilter(Table.Handle, hFilter));
end
else
raise EDatabaseError.Create('Filter handle is invalid or already dropped');
end;