Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TDataSet Filter Keywords

Status
Not open for further replies.

smays

Programmer
Aug 18, 2009
125
US
Does anybody know the complete list of TDataSet Filter Keywords? Is it written anywhere?

Thanks,
Steve.
 
The list of comparison and logical operators that can appear in a TDataset Filter is in the Delphi 2009 help (I don't know about other versions of Delphi). Search for 'Setting the Filter Property' in the help.

The listed operators are:
<
>
>=
<=
=
<>
AND
NOT
OR
+
-
* (multiply)
/
* (wildcard for partial comparisons)

Andrew
Hampshire, UK
 
the statement in filter would be inserted after a WHERE keyword in a SQL statement so you might use everything that could be in a WHERE statement in SQL

for example you could use this snippet to have very flexible filter in your applications :

dm1.qryCustomer.Filter:='CU_Partner=true and CU_CompanyName like ''%'+edtSearchCriteria.Text+'%'''

then after applying filter all company names that are LIKE '%X%' would be retrieved

Please consider that this filtering is applied at client side so it would be some times good and sometimes a diaster.

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top