Menu

TlargeIntField set filter error

shelly
2025-03-24
2025-03-24
  • shelly

    shelly - 2025-03-24

    var
    FDB:TDbf;
    begin
    FDB:=TDbf.Create(nil);
    FDB.FilePathFull:='.\';
    FDB.TableLevel:=7;
    FDB.tablename :='test.dbf';
    Fdb.FieldDefs.Add('prjid',ftlargeint);
    Fdb.FieldDefs.Add('no',ftstring,10);
    Fdb.CreateTable;
    Fdb.active:=True;
    Fdb.AppendRecord([3556856671915480078,'1']);
    Fdb.AppendRecord([3556856671915480078,'2']);
    Fdb.AppendRecord([3556856671915480017,'3']);
    Fdb.Filter:='prjid=3556856671915480078';
    Fdb.Filtered:=True;
    DataSource1.DataSet:=FDB;
    ShowMessage(IntToStr(FDB.RecordCount));
    end;
    filter no effective

     
    • Paul Baker

      Paul Baker - 2025-03-24

      RecordCount is similar to PhysicalRecordCount and is the physical number of records in the file, including deleted records and records excluded by the filter.

      For the number of active records, use ExactRecordCount. This can take a while, as it has to filter all records.

       

Log in to post a comment.

MongoDB Logo MongoDB