Page 1 of 1

CancelUpdates in CachedUpdates.

Posted: Mon 05 Jun 2017 21:59
by MICHALA
In ZEOS CancelUpdates

Code: Select all

if (not ZConnection1.InTransaction) then ZConnection1.StartTransaction;
ZQuery1.ApplyUpdates;
ZConnection1.Rollback;
ZQuery1.CancelUpdates;
after ApplyUpdates and Rollback, restores the old state in dbgrid from the cache.

Why in UniDAC

Code: Select all

if (not UniConnection1.InTransaction) then UniConnection1.StartTransaction;
UniConnection1.AutoCommit:=False;
UniConnection1.ApplyUpdates;
UniConnection1.Rollback;
UniQuery1.CancelUpdates;
UniQuery1.Refresh;
I have to use slow Refresh?!?

Michal

Re: CancelUpdates in CachedUpdates.

Posted: Mon 12 Jun 2017 12:43
by azyk
Thank you for the information. We reproduced the described behavior and are investigating it. We will inform you about the results.

Re: CancelUpdates in CachedUpdates.

Posted: Tue 31 Oct 2017 13:05
by azyk
If in the provided code the UniConnection1.ApplyUpdates call is executed without errors, then the next call of UniQuery1.CancelUpdates will return to dataset the data that were in it when calling ApplyUpdates, but not calling Open. This behavior is correct. More details about CancelUpdates in our online documentation: https://www.devart.com/unidac/docs/?dev ... ates().htm