Re: TADODataset.Filter?
- From: Bill Dekleris <quasar@xxxxxx>
- Date: Sat, 21 Oct 2006 19:24:20 +0300
The wildcard charcter is the asterisk, but you should use the "Like" operator. Thus, if you want to make a partial search using TAdoDataset filter, you should use a command like this:
ADOTable1.Filter := 'name Like bi*'; // name starts from "bi"
or
ADOTable1.Filter := 'name Like *bi*'; // name contains "bi"
Regards,
Bill Dekleris.
-----------------------------------------------------------------------------------------
http://www.infosnap.eu
Home page of InfoSnap - the powerful, all-purpose information and knowledge-base manager.
-----------------------------------------------------------------------------------------
Sven Pran wrote:
"Bill Todd" <no@xxxxxx> wrote in message news:453a2ceb$1@xxxxxxxxxxxxxxxxxxxxxxxxx.If you are using a client-side cursor, which loads the entire result
set into local memory, then a filter may be faster.
--
Bill Todd (TeamB)
Thanks,
I have made some tests (and documentation searches)
but I cannot get filtering on partial text to work?
name = 'smith' returns all (and only) the records where
the field 'name' value is exactly 'smith' (or 'Smith'), but
name = 'sm*' (or name = "sm*") returns no records at all?
I have not been able to find and inspect the property
ADODataset1.FilterOptions in the object inspector, but
I have every reason to believe that it is empty, which
according to the help system is the default implying that
the asterisk is treated as a wildcharacter representing
any number of any characters.
At present I am stuck.
regards Sven
- Follow-Ups:
- Re: TADODataset.Filter?
- From: Bill Dekleris
- Re: TADODataset.Filter?
- References:
- TADODataset.Filter?
- From: Sven Pran
- Re: TADODataset.Filter?
- From: Bill Todd
- Re: TADODataset.Filter?
- From: Sven Pran
- Re: TADODataset.Filter?
- From: Bill Todd
- Re: TADODataset.Filter?
- From: Sven Pran
- TADODataset.Filter?
- Prev by Date: Re: TADODataset.Filter?
- Next by Date: Re: TADODataset.Filter?
- Previous by thread: Re: TADODataset.Filter?
- Next by thread: Re: TADODataset.Filter?
- Index(es):
Relevant Pages
|