editing Tmyquery cause too many selected rows

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
iskywalker
Posts: 16
Joined: Mon 25 Jun 2007 15:00

editing Tmyquery cause too many selected rows

Post by iskywalker » Tue 26 Aug 2008 15:10

Hi!
I am expericencing an annoying bug:
Using a crgrid and a tmyquery:
The crgrid should be sorted a by a column then
when editing an entry of Tmyquery of the column with edit and post the entry will "jump" eventually depending on the sorting and the surrounding entries. the new entry will be selected and set nicely so it can be reached by gotobookmark, the old entry remains but as selected.currentrow= true and so it may mark double as really selected entries.
I happens only with multiselected row evidently.
Any clue how can i avoid it?
thx in advance

iskywalker
Posts: 16
Joined: Mon 25 Jun 2007 15:00

Post by iskywalker » Wed 27 Aug 2008 11:47

seems that

function TMemData.CompareBookmarks(Bookmark1, Bookmark2: PRecBookmark): integer;
...
begin
...
//iskywalker
// Compare by order
// Result := inherited CompareBookmarks(Bookmark1, Bookmark2);
end;

the last line:
Result := inherited CompareBookmarks(Bookmark1, Bookmark2);
seems to be the problem.
Why is it needed?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 27 Aug 2008 13:42

I could not reproduce the problem.
Please send me a complete small sample at dmitryg*devart*com to demonstrate it, including script to create and fill table.

Post Reply