TADODataset.Filter?
- From: "Sven Pran" <no.direct@xxxxxxxxxxx>
- Date: Fri, 20 Oct 2006 22:36:35 +0200
I use the following SQL statement to retrieve records
from a local Access database and display them in
a DBGrid:
SELECT spillernummer, fornavn, etternavn FROM mpData
WHERE fornavn LIKE "AB%" AND etternavn LIKE "DE%"
ORDER BY etternavn, fornavn, spillernummer
This works fine, but I am wondering if I rather than execute
the same SQL statement each time I modify the text 'AB'
or 'DE' would be better off by using the filter property of
TADODataset? I always start the application retrieving
the entire dataset, i.e. the WHERE part of the statement is:
WHERE fornavn LIKE "%" AND etternavn LIKE "%".
I have tried to find some information in the documentation
on the advantage or disadvantage of using "Filter" and also
on how to code the filter in the above case ('Include all
records where the values in the named field begin with the
characters specified').
Sadly to say I haven't found any good answer to either
question and my attempts of coding filter by intuition have
been greatly unsuccessful.
Should I bother with TADODataset.Filter at all, and in case
how do I code the value of that property?
Or should I just continue using SQL SELECT over and over
again within the application?
Comments appreciated.
regards Sven
.
- Follow-Ups:
- Re: TADODataset.Filter?
- From: Bill Todd
- Re: TADODataset.Filter?
- Prev by Date: Add field to ADOTable and a Column for a tDbGrid at runtime
- Next by Date: Re: cmdTable - cmdTableDirect, what's the difference?
- Previous by thread: Add field to ADOTable and a Column for a tDbGrid at runtime
- Next by thread: Re: TADODataset.Filter?
- Index(es):
Relevant Pages
|