Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Базы";
Текущий архив: 2003.05.08;
Скачать: [xml.tar.bz2];

Вниз

Грамматика   Найти похожие ветки 

 
admled   (2003-04-18 13:10) [0]

Ни где не могу найти грамматику написания программной фильтрации одной таблицы, т.е. есть таблица и программно по нажатию клавиши наформе необходимо изменить фильтр ее используя для образца свойство TEXT из Edit1.
Подскажите, пожалуйста (если можно, пример)


 
Anatoly Podgoretsky   (2003-04-18 13:19) [1]

F1 пробовал?


 
Mike Kouzmine   (2003-04-18 13:20) [2]

Filter


 
admled   (2003-04-18 13:27) [3]

Так по F1 грамматики не нашел, в коде пишу
DataModule2.Table1.Filter:= "FIO="аба*"";
ругается ([Error] Unit3.pas(108): Illegal character in input file: """ ($22)). В справке ни чего не нашел, перепробовал всякие комбинации, не получается, не знаю что и делать


 
Mike Kouzmine   (2003-04-18 13:30) [4]

Правильно ругается.


 
Zacho   (2003-04-18 13:33) [5]

Вот пример из хелпа:
Table1.Filter := "State = " + QuotedStr("M*");
Находится за несколько секунд. Учись работать с хелпом.


 
Johnmen   (2003-04-18 13:34) [6]

>Illegal character in input file: """ ($22)).

Что непонятного то ??? Гони $22 и все будет !


 
Соловьев   (2003-04-18 13:38) [7]


To create a filter using the Filter property, set the value of the property to a string that contains the filter’s test condition. For example, the following statement creates a filter that tests a dataset’s State field to see if it contains a value for the state of California:

Dataset1.Filter := "State = " + QuotedStr("CA");

You can also supply a value for Filter based on text supplied by the user. For example, the following statement assigns the text in from edit box to Filter:

Dataset1.Filter := Edit1.Text;

You can, of course, create a string based on both hard-coded text and user-supplied data:

Dataset1.Filter := "State = " + QuotedStr(Edit1.Text);

Blank field values do not appear unless they are explicitly included in the filter:

Dataset1.Filter := "State <> ""CA"" or State = BLANK";

Note: After you specify a value for Filter, to apply the filter to the dataset, set the Filtered property to True.

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, ads 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);

Note: When filtering is on, user edits to a record may mean that the record no longer meets
a filter’s test conditions. The next time the record is retrieved from the dataset, it may therefore “disappear.” If that happens, the next record that passes the filter condition becomes the current record.


 
Anatoly Podgoretsky   (2003-04-18 13:53) [8]

Э тут до фильтров еще далеко, тут вообще речь стоит о самом начальном уровне, как приваиваются строки переменной.
Так это делается с помощью одинарных кавычек!
Числа присваюваются без кавычек и т.д.


 
admled   (2003-04-18 19:46) [9]

Ребята, всем спасибо, как я выяснил все дело в неважной справке с тем дистрибутивом Delphi5, которым я располагаю, а проблема с грамматикой состоит в том, что в основном я пишу на С++, а тут ну надо было на Delphi. Если кто-то сможет поделиться нормальной справко по Delphi, буду очень признателен. ledic@mail.ru


 
Zacho   (2003-04-18 20:48) [10]

На всех виденных мной пиратских дисках с Дельфи был нормальный, полноценный хелп. Конечно, не считая ублюдства, выдаваемого за "качественный и полный перевод на русский" - вот этим пользоваться точно не следует. Так что купи любой пиратский диск с Дельфи и не парься. А на то чтобы тебе выслали хелп, ты вряд ли можешь рассчитывать - например у меня в Д6 он около 80Мб, в Д5 если и меньше, то не намного. А если кто и пришлет, ты не разоришься его выкачивать ? :-)



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

Форум: "Базы";
Текущий архив: 2003.05.08;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.47 MB
Время: 0.009 c
14-23340
race1
2003-04-19 16:07
2003.05.08
cakewalk vs. w2k


14-23324
KaPaT
2003-04-18 13:30
2003.05.08
Интересно, почему Delphi 7


14-23302
kserg
2003-04-22 16:54
2003.05.08
Компонет для построения дерева вхождения


3-23043
pathfinder
2003-04-18 17:11
2003.05.08
Можно ли вызвать хранимую процедуру из триггера?


14-23379
Stranger
2003-04-18 14:45
2003.05.08
Нужен файл vcl.dcp для Delphi6





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский