Ver Mensaje Individual
  #20  
Antiguo 27-04-2007
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 27
Caral Va por buen camino
Hola
Bueno aqui me perdi, campo fecha integer?
Salio un table adicional?, bien dice Egostar, con que componente se presenta la informacion al grid.?
Código Delphi [-]
procedure TForm1.BitBtn1Click(Sender: TObject);
var
   i: Integer;
begin
  if DBGrid1.SelectedRows.Count > 0 then begin
     with DBGrid1.DataSource.DataSet do begin
                   for i := 0 to DBGrid1.SelectedRows.Count-1 do begin
                       GotoBookmark(Pointer(DBGrid1.SelectedRows.Items[i])); [/font]      [font=Arial]
                        sQuery:='Update Fecha_venc Set Fecha_venc= :fecha Where Docto  = :docto';
                        Query1.SQL.Add(sQuery); 
                        //No se que tipo de dato es docto, asi que le pongo String
                        //y estoy usando Table1 porque nbo se que uses para mostrar el DbGrid
                    Query1.ParamByName('docto').AsString:=  Table1.FieldByName('docto').AsString;
                    Query1.ParamByName('fecha').AsDate:= Table1.FieldByName('Fecha_Apli').AsDate + DateToStr(Edit4.Text);
                    Query1.ExecSQL; 
                   end;
            end;
       end
end;
Me explican?
Saludos
Responder Con Cita