Ver Mensaje Individual
  #1  
Antiguo 13-05-2008
martinc5 martinc5 is offline
Miembro
 
Registrado: abr 2006
Posts: 17
Reputación: 0
martinc5 Va por buen camino
Problemas con Filter y ADOQuery

Hola gente... saben q tengo problemas con el filter cuando utilizo el componente ADO cuando usaba el BDE no lo tenia tal vez me falte habilitar alguna opción en el componente...
Estoy trabajando con ADOQuery y SQLServer
Les muestro el código, la consulta está bien xq la muestro en un dbgrid.

Código Delphi [-]
 with Qclientes do
    begin
      if Ebusca.Text<> '' then
      begin Filtered:=false;
           if buscarpor=1 then  Filter:='apenomc ='+Quotedstr(Ebusca.Text+'*');
           if buscarpor=2 then  Filter:='dom ='+Quotedstr(Ebusca.Text+'*');
           if buscarpor=3 then  Filter:='idempc ='+Quotedstr(Ebusca.Text);
           if buscarpor=4 then  Filter:='codzona ='+Quotedstr(Ebusca.Text);
           if buscarpor=5 then  Filter:='cuit ='+Quotedstr(Ebusca.Text+'*');
             Filtered:=true;
      end else
        begin  Filtered:=false; Filter:=''; Filtered:=true;  end;
    end;

Esta misma sintáxis use con BDE y funcionaba muy bien pero con ADO no.

Desde ya, muchas gracias este foro siempre me ha ayudado bastante.

Saludos
Responder Con Cita