Discussion:
How to position in a DBGrid with FetchOndDemand ?
(too old to reply)
Mark
2008-01-11 16:12:13 UTC
Permalink
Using TSimpleDataSet

I have an edit field where the user can key in starting characters of a name
and I do a FindNearest on it to position the cursor to the first occurence.

FindNearest needs to have an index. Having an index means that all data is
needed so the index can be made.

Needing all data defeats the purpose of FetchOnDemand = True and
PacketREcords > 0.

Is positioning possible without getting all data and if yes, any pointers on
how to do this ?

Thanks,
Mark
Bill Todd
2008-01-11 17:24:14 UTC
Permalink
Have the user key in a few characters of the name then SELECT just the
records that begin with those characters. Do not use FindNearest on the
entire table.
--
Bill Todd (TeamB)
Loading...