var BookmarkList: TList;
... ON CREATE BookmarkList := TList.Create;
// Feed Bookmarks to TList. You can add random record... just remember the order.
procedure TFormTest.ButtonAddBookmarkToListClick(Sender: TObject);
var TempBookmark: TBookmark;
begin
TempBookmark := mySQLTable1.GetBookmark;
BookmarkList.Add(TempBookmark);
end;
// Go to Bookmarks. ShowMessage is there just for me to check if it is pointing back to the right record.
procedure TFormTest.ButtonGoToBookmarksClick(Sender: TObject);
var Cnt: Integer;
begin
for Cnt := 0 to BookmarkList.Count -1 do begin
mySQLTable1.GotoBookmark(TBookMark(BookmarkList.Items[Cnt]));
ShowMessage(mySQLTable1.FieldByName('Customer').AsString);
end;
end;
|