Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.06.17;
Скачать: CL | DM;

Вниз

Можно ли объединить два фильтра   Найти похожие ветки 

 
delphino   (2007-05-25 12:12) [0]

Query1.Filter:="S_Name="+quotedstr(ComboBox1.Text+"*");
Query1.Filter:="S_Type="+quotedstr(ComboBox2.Text+"*");


 
ЮЮ ©   (2007-05-25 12:15) [1]

А так разве не работает?

Query1.Filter:=
 "S_Name="+quotedstr(ComboBox1.Text+"*" +
 " AND " +
 "S_Type="+quotedstr(ComboBox2.Text+"*");


 
delphino   (2007-05-28 03:32) [2]


> А так разве не работает?
>
> Query1.Filter:=
>  "S_Name="+quotedstr(ComboBox1.Text+"*" +
>  " AND " +
>  "S_Type="+quotedstr(ComboBox2.Text+"*");

нет


 
ЮЮ ©   (2007-05-28 03:43) [3]

> нет

Странно, а справка гоаорит - да:

Filters can compare field values to literals and to constants using the following comparison and logical operators:

Operator Meaning
< Less than
> Greater than
>= Greater than or equal to
<= Less than or equal to
= Equal to
<> Not equal to
AND Tests two statements are both True
NOT Tests that the following statement is not True
OR Tests that at least one of two statements is True
+ Adds numbers, concatenates strings, adds numbers to date/time values (only available for some drivers)
- Subtracts numbers, subtracts dates, or subtracts a number from a date (only available for some drivers)
* Multiplies two numbers (only available for some drivers)
/ Divides two numbers (only available for some drivers)
* wildcard for partial comparisons (FilterOptions must include foPartialCompare)
By using combinations of these operators, you can create fairly sophisticated filters. For example, the following statement checks to make sure that two test conditions are met before accepting a record for display:

(Custno > 1400) AND (Custno < 1500);


 
delphino   (2007-05-28 05:34) [4]


> (Custno > 1400) AND (Custno < 1500);

Здесь фильтр по одному полю. А у меня два фильтра по разным полям. Может в этом дело?


 
Loginov Dmitry ©   (2007-05-28 08:29) [5]

> Здесь фильтр по одному полю. А у меня два фильтра по разным
> полям. Может в этом дело?


Число полей не имеет значения.



Страницы: 1 вся ветка

Текущий архив: 2007.06.17;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.023 c
2-1180037650
aleko
2007-05-25 00:14
2007.06.17
таблица MS Word


15-1179817899
Rouse_
2007-05-22 11:11
2007.06.17
Производители Spyware подали в суд на Антивирус :)


2-1180181459
A Programmer
2007-05-26 16:10
2007.06.17
Не работает копирование в буфер в win9x


10-1133792435
LORN
2005-12-05 17:20
2007.06.17
сохранить из olecontainer в ексел


15-1179485706
Mishenka
2007-05-18 14:55
2007.06.17
Невиден компонент на палитре компонентов.