![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Фильтрация в ADODataSet [D5, D6]
_dron_ © (2002-07-02 16:11:00)Возможно ли сделать фильтрацию в ADODataSet таким образом, чтобы фильтровалось по принципу поле="начало имени *"
* - все что угодно.
kig (2002-07-02 17:37:00) [1]Если курсор клиентский, то
Filter Property
Indicates a filter for data in a Recordset.
....
FieldName must be a valid field name from the Recordset. If the field name contains spaces, you must enclose the name in square brackets.
Operator must be one of the following: <, >, <=, >=, <>, =, or LIKE.
....
If Operator is LIKE, Value can use wildcards. Only the asterisk (*) and percent sign (%) wild cards are allowed, and they must be the last character in the string. Value cannot be null.
....
In a LIKE clause, you can use a wildcard at the beginning and end of the pattern (for example, LastName Like "*mit*"), or only at the end of the pattern (for example, LastName Like "Smit*").
Johnmen (2002-07-02 16:50:00) [2]Обычным образом...
const
NI = "начало имени";
Accept:=AnsiLowerCase(Copy(DataSet.FieldByName("MyField").AsString,1,Length(NI)))=NI;
_dron_ (2002-07-02 16:36:00) [3]Курсор clUseClient
А по какому принципу можно это сделать, используя OnFilterRecord
Johnmen (2002-07-02 16:25:00) [4]Используя OnFilterRecord можно заделать любой фильтр....
kig (2002-07-02 16:20:00) [5]Курсор какой?