Recent

Author Topic: SQLserver, zeos and Filter = empty?  (Read 6553 times)

cpalx

  • Hero Member
  • *****
  • Posts: 647
SQLserver, zeos and Filter = empty?
« on: February 05, 2009, 08:29:29 pm »
hello
i have a sqlserver conecction with zeos.
i use a ztable component (with a dbgrid), it shows the records, when i try to filter using this code :

   Ztable.Filtered:=false;
   Ztable.Filter:= ' AFiled like  ' +  QuotedStr( edit.Text + '%');
   Ztable.Filtered:=true;

the result is always empty.
I use Lazarus 0.9.26-1  with fpc 2.2.2 in Windows XP-SP3

Any idea?

cpalx

  • Hero Member
  • *****
  • Posts: 647
Re: SQLserver, zeos and Filter = empty?
« Reply #1 on: February 05, 2009, 08:34:49 pm »
the solution, it works like

   Ztable.Filtered:=false;
   Ztable.Filter:= ' AFiled like  ' +  QuotedStr( edit.Text + '*');
   Ztable.Filtered:=true;

the comodin is *, is not %

 

TinyPortal © 2005-2018