Board index » delphi » IBTable.Filter or IBQuery.Filter

IBTable.Filter or IBQuery.Filter

HI,

Somebody can advice me how to use the multiple filtering?

I did it: Ex: lclPrf = ' aaa' , lclCorte = 'zzz'? and lclsobratmp =
99999

?? tbBarrasUsadas.Filter := 'CodPerfil = '+lclPrf+ ' and Corte = '+
lclCorte+ ' and Tamanho = QuotedStr(FloatToStr(lclSobratmp));
?? tbBarrasUsadas.Filtered := True;

but did not work well, Interbase send me the message that field of aaa
isn't exit. Off course, because,? 'aaa' is a data and not a field name.
Could some one how to solve it?

tks in advance.
?
?
?

 

Re:IBTable.Filter or IBQuery.Filter


You have to quote your strings.  Your Filter looks like

CodPerfil = aaa and Corte = zzz and Tamanho = '9999'

but what you want is

CodPerfil = 'aaa' and Corte = 'zzz' and Tamanho = '9999'

Quote
Mary Mariko Torigoe wrote:

> HI,

> Somebody can advice me how to use the multiple filtering?

> I did it: Ex: lclPrf = ' aaa' , lclCorte = 'zzz'  and lclsobratmp =
> 99999

>    tbBarrasUsadas.Filter := 'CodPerfil = '+lclPrf+ ' and Corte = '+
> lclCorte+ ' and Tamanho = QuotedStr(FloatToStr(lclSobratmp));
>    tbBarrasUsadas.Filtered := True;

> but did not work well, Interbase send me the message that field of aaa
> isn't exit. Off course, because,  'aaa' is a data and not a field name.
> Could some one how to solve it?

> tks in advance.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
This sad little lizard told me that he was a brontosaurus on his mother's
side.  I did not laugh; people who boast of ancestry often have little else
to sustain them.  Humoring them costs nothing and adds to happiness in
a world in which happiness is in short supply.   (RAH)

Re:IBTable.Filter or IBQuery.Filter


I thought that the FILTER property of IBX Datasets did not work!

"Jeff Overcash (TeamB)" <jeffoverc...@mindspring.com> escreveu na mensagem
news:3CEB9C9E.2AC25445@mindspring.com...

Quote
> You have to quote your strings.  Your Filter looks like

> CodPerfil = aaa and Corte = zzz and Tamanho = '9999'

> but what you want is

> CodPerfil = 'aaa' and Corte = 'zzz' and Tamanho = '9999'

> Mary Mariko Torigoe wrote:

> > HI,

> > Somebody can advice me how to use the multiple filtering?

> > I did it: Ex: lclPrf = ' aaa' , lclCorte = 'zzz'  and lclsobratmp =
> > 99999

> >    tbBarrasUsadas.Filter := 'CodPerfil = '+lclPrf+ ' and Corte = '+
> > lclCorte+ ' and Tamanho = QuotedStr(FloatToStr(lclSobratmp));
> >    tbBarrasUsadas.Filtered := True;

> > but did not work well, Interbase send me the message that field of aaa
> > isn't exit. Off course, because,  'aaa' is a data and not a field name.
> > Could some one how to solve it?

> > tks in advance.

> --
> Jeff Overcash (TeamB)
>       (Please do not email me directly unless  asked. Thank You)
> This sad little lizard told me that he was a brontosaurus on his mother's
> side.  I did not laugh; people who boast of ancestry often have little
else
> to sustain them.  Humoring them costs nothing and adds to happiness in
> a world in which happiness is in short supply.   (RAH)

Re:IBTable.Filter or IBQuery.Filter


Quote
Anderson de Farias wrote:

> I thought that the FILTER property of IBX Datasets did not work!

TIBTable rewrites the SQL IIRC.  It does not for TIBQuery or TIBDataSet.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
This sad little lizard told me that he was a brontosaurus on his mother's
side.  I did not laugh; people who boast of ancestry often have little else
to sustain them.  Humoring them costs nothing and adds to happiness in
a world in which happiness is in short supply.   (RAH)

Re:IBTable.Filter or IBQuery.Filter


Thank you Jeff.
That worked so good and it solved my biggest problem. Sure, you are totaly
right that I had to put a QuotedStr, what's a shame.

Tks for all eigther.

Quote
"Jeff Overcash (TeamB)" wrote:
> You have to quote your strings.? Your Filter looks like

> CodPerfil = aaa and Corte = zzz and Tamanho = '9999'

> but what you want is

> CodPerfil = 'aaa' and Corte = 'zzz' and Tamanho = '9999'

> Mary Mariko Torigoe wrote:

> > HI,

> > Somebody can advice me how to use the multiple filtering?

> > I did it: Ex: lclPrf = ' aaa' , lclCorte = 'zzz'? and lclsobratmp =
> > 99999

> >??? tbBarrasUsadas.Filter := 'CodPerfil = '+lclPrf+ ' and Corte = '+
> > lclCorte+ ' and Tamanho = QuotedStr(FloatToStr(lclSobratmp));
> >??? tbBarrasUsadas.Filtered := True;

> > but did not work well, Interbase send me the message that field of aaa
> > isn't exit. Off course, because,? 'aaa' is a data and not a field name.
> > Could some one how to solve it?

> > tks in advance.

> --
> Jeff Overcash (TeamB)
> ????? (Please do not email me directly unless? asked. Thank You)
> This sad little lizard told me that he was a brontosaurus on his mother's
> side.? I did not laugh; people who boast of ancestry often have little else
> to sustain them.? Humoring them costs nothing and adds to happiness in
> a world in which happiness is in short supply.?? (RAH)

Other Threads