Subject | Re: [IBO] TIB_Query.IsEmpty bug |
---|---|
Author | tomjanczkadao |
Post date | 2012-11-06T07:52:40Z |
Hi
Bug is 100% reproducible (Delphi 7). I've uploaded sample app to Files area (IsEmpty bug.zip). Every single line of attached code is important, including setting properties for TIB_Grid (TrackGridRow, ListBoxStyle).
Adding a check for Active solves the problem. Is it temporary or final solution?
Regards, Tomek
Bug is 100% reproducible (Delphi 7). I've uploaded sample app to Files area (IsEmpty bug.zip). Every single line of attached code is important, including setting properties for TIB_Grid (TrackGridRow, ListBoxStyle).
Adding a check for Active solves the problem. Is it temporary or final solution?
Regards, Tomek
--- In IBObjects@yahoogroups.com, "IBO Support List" <supportlist@...> wrote:
>
> I didn't get the problem to reproduce, but I think there is a change that
> could make a positive difference.
>
> In IB_Components.pas find this method implementation and change it to what I
> have here:
>
> function TIB_BDataset.IsEmpty( MinRows: integer ): boolean;
> var
> tmpCnt: integer;
> begin
> if ( not Prepared ) or ( not IsSelectSQL ) then
> Result := true
> else
> begin
> while ( Active ) and
> ( BufferRowCount < MinRows ) and
> (( not BufferHasEof ) or
> ( not BufferHasBof )) do
> begin
> tmpCnt := MinRows - BufferRowCount - 1;
> if ( BufferRowCount < MinRows ) and ( not BufferHasEof ) then
> ValidateRows( EofRowNum, EofRowNum + tmpCnt );
> tmpCnt := MinRows - BufferRowCount - 1;
> if ( BufferRowCount < MinRows ) and ( not BufferHasBof ) then
> ValidateRows( BofRowNum - tmpCnt, BofRowNum );
> end;
> Result := BufferRowCount < MinRows;
> end;
> end;
>
> I added a check for Active in the loop that looks for whether things are
> empty or not.
>
> Please let me know how that works.
>
> Jason