Главная страница | назад





Article #15245: Using the Filter for a TDataSet in C++Builder

 Question and Answer Database
FAQ245C.txt Using the Filter for a TDataSet in C++Builder
Category :VCL
Platform :All
Product :C++Builder 1.x
Question:
How do I set the filter on a TDataSet component
when the field that I am trying to filter expecting
a string value? Such as a Name field.
Answer:
You must surround the value that you are trying to filter
out with "'" (single quotes).
For Example:
Table1->Filtered = true;
Table1->Filter = "NameField = 'Bob Smith'";
Table1->Refresh();
7/2/98 10:32:32 AM

Last Modified: 01-SEP-99