Главная страница
    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.45 MB
Время: 0.041 c
3-1174646438
ANB
2007-03-23 13:40
2007.06.17
Можно ли в оракле в контексте одной сессии переключать DBLink ?


11-1160814324
Vladimir Kladov
2006-10-14 12:25
2007.06.17
Версия 2.40


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


2-1180072018
Garacio
2007-05-25 09:46
2007.06.17
Как можно организовать передачу данных?


15-1179751927
Alkid
2007-05-21 16:52
2007.06.17
Хочу спросить пару советов по железу





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский