TZQuery.CancelUpdates moves to another record

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
RaThek
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 22.01.2014, 16:56

TZQuery.CancelUpdates moves to another record

Post 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?
RaThek
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 22.01.2014, 16:56

Re: TZQuery.CancelUpdates moves to another record

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