Re: TADODataset.Filter?




"Bill Todd" <no@xxxxxx> wrote in message
news:453940f4$1@xxxxxxxxxxxxxxxxxxxxxxxxx
The fact that you want to filter the dataset suggests that there are a
lot of records. If so, why do you want to retrieve all of them
initially? Users never want to look through more than 100 records
manually.

There is no reason not to use the WHERE clause to select the records
you want.

--
Bill Todd (TeamB)

Good question, the dataset is a membership directory with about
30000 entries. I have two edit fields where the user can type in the
leading characters in the given name and surname and the display
(DBGrid) continuously reflects what has been typed.

Performance is quite OK so I don't fancy an additional "Run" button
that must be pressed each time the user wants to see the effrect of
his filtering so far. Instead I execute the SQL SELECT statement
from inside the OnChange event handler for the edit fields.

I did wonder if it would be more efficient, once I had the entire table
loaded to my TADODataset, to control the display with the filter
property rather than by re-issuing the SQL statement, but when I
tried "filter" I could not get it to work? I suspect that my "problem"
was "which character(s) is/are used as wildcard in the filter text"?

regards Sven


.


Quantcast