Page 1 of 1

TZQuery.CancelUpdates moves to another record

Posted: 03.11.2014, 21:27
by RaThek
Hello,

I have DBGrid connected to TZQuery via TDataSource. Query selects records from one table. Simple as walk in the park.
Now, when I use CancelUpdates procedure of TZQuery current row changes randomly. It doesn't matter if there are any updates made before or if CachedUpdates are set to True or False. Simple fire CancelUpdates moves dataset to a random record.
How can I solve it?

Re: TZQuery.CancelUpdates moves to another record

Posted: 04.11.2014, 13:41
by RaThek
I've solved that using bookmarks but this is far away from well fashioned way:

Code: Select all

Bookmark := frmMain.Zquery.Bookmark;
frmMain.Zquery.DisableControls;
frmMain.Zquery.CancellUpdates;
frmMain.Zquery.GotoBookmark(Bookmark);
frmMain.Zquery.EnableControls;