Subject | Re: [IBO] Howto iterate through all selected rows |
---|---|
Author | Lucas Franzen |
Post date | 2001-11-22T11:43:40Z |
procedure AllSelectRows;
var
sl: TStringList;
ii: Integer;
begin
sl := TStringList.Create;
with myQry do
begin
SelectedBookmarks ( sl ); // Get all List of Selected Records
(Bookmarks)
for II := 0 to sl.Count - 1 do
begin
BufferBookmark := sl[ii];
// do whatever you want with the current Record now ....
ShowMessage ( 'SELECTED ID = ' + BufferFieldbyName ( 'ID_FIELD'
).AsString );
end;
end;
end;
Luc.
mirco@... schrieb:
var
sl: TStringList;
ii: Integer;
begin
sl := TStringList.Create;
with myQry do
begin
SelectedBookmarks ( sl ); // Get all List of Selected Records
(Bookmarks)
for II := 0 to sl.Count - 1 do
begin
BufferBookmark := sl[ii];
// do whatever you want with the current Record now ....
ShowMessage ( 'SELECTED ID = ' + BufferFieldbyName ( 'ID_FIELD'
).AsString );
end;
end;
end;
Luc.
mirco@... schrieb:
>
> How do I iterate through all selected rows in a query, that is have a
> loop that gets executed for every row where the selected property is
> true.
>
> I know about the selected[] array, but it is pretty ineffective to
> iterate through *all* rows, just to find those (few) that are
> actually selected.
>
> SelectedBookmarks looks good, but what if the user has selected a
> very large number of rows (e.g 100.000 via SelectAll)?
> SelectedBookmarks will return a huge list, taking up more memory than
> the computer might have...
>
> Mirco
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/