Page 1 of 1

Calling of UpdatesPending at DoBeforeClose causes Error

Posted: 12.02.2017, 17:09
by Soner
Hello,
Calling of TZQuery.UpdatesPending at TZQuery.DoBeforeClose causes Error(listindex-error), here is the solution:

Code: Select all

ZDbcCachedResultSet.pas

function TZAbstractCachedResultSet.IsPendingUpdates: Boolean;
begin
  Result := Assigned(FInitialRowsList) and (FInitialRowsList.Count > 0);
  //Original:  Result := FInitialRowsList.Count > 0; 
  //this can cause error if you Call TZQuery.UpdatesPending at DoBeforeClose; 
  //because FInitialRowsList can be nil if nothing inserted/deleted/modified 
end;   

Re: Calling of UpdatesPending at DoBeforeClose causes Error

Posted: 13.02.2017, 11:58
by marsupilami
Hello Soner,

I created a ticket on Sourceforge (see https://sourceforge.net/p/zeoslib/tickets/187/) and will merge that change soon.
With best regards,

Jan