Ver Mensaje Individual
  #5  
Antiguo 05-12-2011
adan12 adan12 is offline
Miembro
NULL
 
Registrado: jun 2011
Posts: 17
Reputación: 0
adan12 Va por buen camino
problemas delphi y datapiker

yo tengo este codigo quiero hacer una consulta de tal fecha a tal fecha pero tengo este codigo y no me sale nada marco las fechas y sale q no hay registro y si hay registros

adoQuery2.Close;
adoQuery2.SQL.Clear;
adoQuery2.SQL.Add('select * from viatico where fecha_ida Between '+
FormatDateTime('DDMMYYYY',DateTimePicker1.Date)+' And '+
FormatDateTime('DDMMYYYY',DateTimePicker2.Date));
adoQuery2.Open;
if ADOQuery2.IsEmpty then
begin
ADOQuery2.Close;
ADOQuery2.SQL.Clear;
MessageBox(Handle, 'No hay entradas.', 'Warnning', Mb_Ok + MB_ICONHAND + Mb_DefButton1)
end
end;
Responder Con Cita