var
iCount : integer;
pBookmark : TBookmark;
pDataSetSource : TDataSet;
begin
...
Screen.Cursor := crHourGlass;
iCount := 1;
pBookmark := pDatasetSource.GetBookmark;
pDatasetSource.DisableControls;
try
pDatasetSource.First;
while not pDatasetSource.Eof do
begin
try
{ action with record }
finally
inc( iCount );
pDatasetSource.Next;
end;
end;
finally
pDatasetSource.GotoBookmark( pBookmark );
pDatasetSource.EnableControls;
Screen.Cursor := crDefault;
end;
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Tuesday, March 19, 2019
DELPHI - How to go through all rows in dataset with bookmark
Bookmarks store your position in dataset and after action you can return back to original record.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment