Re: filer table by a word ....

From: sew crazy (sew.crazy_at_webmail.co.za)
Date: 03/20/05


Date: Sun, 20 Mar 2005 08:56:09 +0200

On Sat, 19 Mar 2005 13:00:05 GMT, Jeremy Collins
<jd.collins@ntlworld-not.com> wrote:

>sew crazy wrote:
>> begin
>> sDate := MonthCalendar1.Date;
>> adotable1.Filter := '(distance > 300)';
>> adotable1.Filter := '(type of transport = (spoor))';
>> // i want to filer a word in a colum
>> // the first filter works not the second ....
>>
>> adotable1.Filtered := True;
>> end;
>
>Filters follow the same rules as the SQL variant of the underlying
>DBMS; I'm not aware of any that handle strings like your approach.
>
>ADOTable1.Filter := '(type of transport = ''spoor''');
>
>It's not terribly good practice to have spaces in field names, and
>also TADOTable is only provided for backwards compatibility with BDE-
>based components. You should really be using TADODataset or TADOQuery.
>
>With a TADOQuery you can use SQL to return only the data you need,
>i.e. 'SELECT * FROM tb_mytable WHERE TypeOfTransport = ''spoor'''

got it THANX :)
ADOTable1.Filter := '(typeoftransport = ''spoor'')';

Changed the field names like you sugested .. was actually a lot of
work having to rebuild most of the links ... :-p but was worth it
busy setting a question for students - have to make use of their field
of reference .. sql is minor @ this stage ,,,
Regards ...