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?
TZQuery.CancelUpdates moves to another record
Moderators: gto, cipto_kh, EgonHugeist
Re: TZQuery.CancelUpdates moves to another record
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;