Ver Mensaje Individual
  #2  
Antiguo 17-03-2009
Avatar de ContraVeneno
ContraVeneno ContraVeneno is offline
Miembro
 
Registrado: may 2005
Ubicación: Torreón, México
Posts: 4.738
Reputación: 24
ContraVeneno Va por buen camino
Pues sí, el programa hace exatamente lo que le dices.

Tal vez esto sea lo que buscas:
Código Delphi [-]
procedure TANEXO1.F_INICIOChange(Sender: TObject);
begin
  Edit1.Text :=DateToStr( F_INICIO.DateTime +6 );
  Memo1.Lines.Clear;
  Memo1.lines.add('select * from ANEXO_1');
  Memo1.lines.add('where PAIS=' + QuotedStr(Combobox1.Text));
  Memo1.lines.add('and AREA=' + QuotedStr(AREA.Text) );
  Memo1.lines.add('and S_F_INICIO=#' + datetostr(f_inicio.DateTime) +'#');
  Memo1.lines.add('and S_F_FIN=#' + edit1.Text + '#'
  Memo1.lines.add('order by PAIS, FECHA_VTTO;');

Try
 AdoDataSet1.Close;
 AdoDataSet1.CommandText:=memo1.Text;
 AdoDataSet1.Active :=True;
 Except
 on E:Exception do begin
 Showmessage('Error en datos: '+E.ClassName+'-'+E.ErrorMsg);
 memo1.Lines.Add('error en datos')
 end;
end;
__________________

Responder Con Cita