Ver Mensaje Individual
  #2  
Antiguo 29-11-2008
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 29
Lepe Va por buen camino
Así debería ir:
Código Delphi [-]
QC.Close;
   QC.SQL.Clear;
   QC.SQL.Add('SELECT * from envios');
   QC.SQL.Add('Where (envios.modelo = :mod) and (envios.fecha Between :Fecha1 and :Fecha2)');

   QC.SQL.Add('ORDER By envios.Fecha');
   QC.Parameters.ParamByName('Mod').Value:=frmfreportes.Edopcion.Text;
   QC.Parameters.ParamByName('Fecha1').Value:=trunc(frmfreportes.MCdesde.Date);
   QC.Parameters.ParamByName('Fecha2').value:=trunc(frmfreportes.MCHasta.Date);

   QC.active:=true;
   QC.Open;

he retocado la sintaxis de between y añadir el trunc porque Tdate y Tdatetime es lo mismo en delphi, así que le pasaba también la hora.

Saludos
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
Responder Con Cita