Subject Fast way to get multi selected set
Author roblemmens6
I have a large dataset (200000+) the users must be able to multi
select records in this set, but the method i use to get the selected
records is way to inefficient for usage with such a large table:

q.BufferFirst;
While not q.BufferEOF do begin
if q.Selected[q.BufferRowNum] then
sl.Add(IntToStr(q.BufferFields.Values['DOC_NR']))
q.BufferNext;
end;

where q is a TIB_Query component

On small sets this works great. But on a large set it is too slow to
be usable. I cant let the users select from a subset of this dataset
in order to minimize the buffer.

Is there a way to get the selected rows directly without traversing
the buffer?