Board index » delphi » REQ: Help setting filter on ttable

REQ: Help setting filter on ttable

I'm trying to set a filter on a paradix table but i get an error
at runtime :"arithmetic in filter expressions not supported".
I can't see why because i only use "=", "AND", "<=", ">="

Here's the code :
------------------StartCode---------------
      Datab.Taux.Filter := 'devise = '+QuotedStr(EcLogin.LogDevSoc.Text)+'
AND Date >= '
                            +DateToStr(DateDebut.Date)+' AND Date <= '
                            +DateToStr(DateFin.Date)+' AND Code = '
                            +QuotedStr(CbMon.Text);
      Datab.Taux.Filtered := True;
------------------EndCode---------------
Delphi version is 6 and table is Paradox.
Index is devise+date+code

Can anyone help?

 

Re:REQ: Help setting filter on ttable


I forgot to say HELLO in my previous message :) Sorry for that.

Well i guess the problem comes when converting Date. It takes the "/" as
operator.
But if i send it as quoted it then can't be compared.
What can i do???

Thanks
Paulo

"PSilva" <paulocsilvaREM...@yahoo.com> a crit dans le message de news:
3dde11f8$0$7117$4d4ef...@news.be.uu.net...

Quote
> I'm trying to set a filter on a paradix table but i get an error
> at runtime :"arithmetic in filter expressions not supported".
> I can't see why because i only use "=", "AND", "<=", ">="

> Here's the code :
> ------------------StartCode---------------
>       Datab.Taux.Filter := 'devise = '+QuotedStr(EcLogin.LogDevSoc.Text)+'
> AND Date >= '
>                             +DateToStr(DateDebut.Date)+' AND Date <= '
>                             +DateToStr(DateFin.Date)+' AND Code = '
>                             +QuotedStr(CbMon.Text);
>       Datab.Taux.Filtered := True;
> ------------------EndCode---------------
> Delphi version is 6 and table is Paradox.
> Index is devise+date+code

> Can anyone help?

Other Threads