首页 > 其他分享 >修复zeosdbo-7.2.14-stable FindFirst和FindLast只有一条记录时返回false的Bug

修复zeosdbo-7.2.14-stable FindFirst和FindLast只有一条记录时返回false的Bug

时间:2022-12-03 10:11:23浏览次数:71  
标签:Index end zeosdbo FindFirst 7.2 false

zeosdbo-7.2.14-stable/src/component/ZAbstractRODataset.pas
将ZAbstractRODataset.pas第4396行改为(红字行):

  { Finds a record. }
  SavedFilterEnabled := FilterEnabled;
  try
    FilterEnabled := True;
    while (Index >= 1) and (Index <= CurrentRows.Count) do
    begin
      if (FilterRow(Index)) or (CurrentRows.Count=1) then      //2022.07.28  LBZ
      begin
        Result := True;
        Break;
      end;
      if GoForward then
      begin
        Inc(Index);
        if Index > CurrentRows.Count then
          FetchOneRow;
      end
      else
        Dec(Index)
    end
  finally
    FilterEnabled := SavedFilterEnabled;
  end;

然后重新编译zeos,修复FindFirst和FindLast只有一条记录时返回false的Bug.

标签:Index,end,zeosdbo,FindFirst,7.2,false
From: https://www.cnblogs.com/qiufeng2014/p/16947066.html

相关文章