Subject Re: [IBO] Howto iterate through all selected rows
Author Lucas Franzen
procedure AllSelectRows;
sl: TStringList;
ii: Integer;
sl := TStringList.Create;
with myQry do
SelectedBookmarks ( sl ); // Get all List of Selected Records
for II := 0 to sl.Count - 1 do
BufferBookmark := sl[ii];

// do whatever you want with the current Record now ....
ShowMessage ( 'SELECTED ID = ' + BufferFieldbyName ( 'ID_FIELD'
).AsString );


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.
> ___________________________________________________________________________
> - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
> Your use of Yahoo! Groups is subject to