Ver Mensaje Individual
  #4  
Antiguo 31-01-2005
lucianojdg lucianojdg is offline
Miembro
 
Registrado: dic 2003
Posts: 42
Reputación: 0
lucianojdg Va por buen camino
Smile RE: Query y Parámetros

Proba con esto:

DateC := EncodeDate(Year,Month,Day);
IBQueryCheck.SQL.Clear;
IBQueryCheck.SQL.Add('Select * from SEASONS');
IBQueryCheck.SQL.Add('where DATEFROM <= ateC and DATETO >= ateC');
IBQueryCheck.ParamByName('DateC').AsDate := DateC;
IBQueryCheck.Open;

Otra forma de hacer los mismo es la sigueinte:

DateC := EncodeDate(Year,Month,Day);
IBQueryCheck.SQL.Clear;
IBQueryCheck.SQL.Add('Select * from SEASONS');
IBQueryCheck.SQL.Add('where ' + Chr(39) + DateToStr(DateC) + Char(39) +
' Between DATEFROM and DATETO');
IBQueryCheck.Open;


Nota: Hay un espacio antes del Between

Saudos


Luciano
Responder Con Cita