Calling of UpdatesPending at DoBeforeClose causes Error

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
Soner
Junior Boarder
Junior Boarder
Posts: 27
Joined: 12.02.2017, 17:00

Calling of UpdatesPending at DoBeforeClose causes Error

Post 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;   
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Calling of UpdatesPending at DoBeforeClose causes Error

Post 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
Post Reply