![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Product Manuals » DBISAM Version 4 Manual for RAD Studio XE (C++) » Using DBISAM » Setting Filters on Tables and Query Result Sets |
Difference | Description |
Correlation Names | You cannot use table or column correlation names in filter expressions. |
Aggregate functions | You cannot use any aggregate functions like SUM(), COUNT(), AVG(), etc. in filter expressions. |
{ // Set the filter expression MyTable->Filter="(LastSaleDate >= "+QuotedStr("1998-01-01")+") "+ "and (LastSaleDate <= "+QuotedStr("1998-12-31")+") "+ "and (TotalSales > 10000)'; TFilterOptions FilterOptions; FilterOptions->Clear(); MyTable->FilterOptions=FilterOptions; MyTable->Filtered=true; }
{ // Set the filter expression, in this case for // a partial-match, case-insensitive filter MyTable->Filter="CustomerName = "+QuotedStr("A*"); TFilterOptions FilterOptions; FilterOptions->Clear(); FilterOptions << foCaseInsensitive; MyTable->FilterOptions=FilterOptions; MyTable->Filtered=true; switch (MyTable->FilterOptimizeLevel) { case foNone: { ShowMessage("The filter is completely unoptimized"); } case foPartial: { ShowMessage("The filter is partially optimized"); } case foFull: { ShowMessage("The filter is completely optimized"); } } }
void __fastcall TMyForm::TableFilterRecord(TDataSet *DataSet, bool &Accept); { Accept=false; if (Pos("Hardware", DataSet->FieldByName("CustomerName")->AsString) > 0)) { Accept=true; } }
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |