Ver Mensaje Individual
  #2  
Antiguo 05-09-2008
Avatar de ContraVeneno
ContraVeneno ContraVeneno is offline
Miembro
 
Registrado: may 2005
Ubicación: Torreón, México
Posts: 4.740
Reputación: 26
ContraVeneno Va por buen camino
Código Delphi [-]
with TuDataset do begin
 if active then close,
 SQL.Clear,
 SQL.Add('Insert into TuTabla(Fecha)');
 SQL.Add('Values(:fecha)');
 ParamByName('Fecha').AsDateTime := TuDTPicker.DateTime;
 ExecSQL;
end; //with

o con un update:
Código Delphi [-]
with TuDataset do begin
 if active then close,
 SQL.Clear,
 SQL.Add('Update TuTabla');
 SQL.Add('Set Fecha = :Fecha');
 SQL.Add('Where ID = :ID');
 ParamByName('ID').AsString := UnEdit.Text;
 ParamByName('Fecha').AsDateTime := TuDTPicker.DateTime;
 ExecSQL;
end; //with
__________________

Responder Con Cita