Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Conexión con bases de datos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Conexión con bases de datos

 
 
Herramientas Buscar en Tema Desplegado
  #9  
Antiguo 28-02-2012
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Poder: 28
Caral Va por buen camino
Hola
Actualizar la tabla LOTE:
Coloca un query en el form que actualiza, llamalo IBQueryTemp y añade el final del codigo a lo que tienes:

Código Delphi [-]
procedure TForm1.ts3Enter(Sender: TObject);
begin
       if Vedi then
         begin
            TbVentas.Insert;
      
            dbePIEDRAS2.Text := IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('PIEDRA_NL').AsInteger);
            dbeTIPO_VE.Text := 'V';

      
            dbeCUAD2.Text := IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('CUAD_NL').AsInteger);
            dbeREDO2.Text := IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('REDO_NL').AsInteger);
            dbeOVAL2.Text := IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('OVAL_NL').AsInteger);
            dbeLAGR2.Text := IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('LAGR_NL').AsInteger);
            dbeCORA2.Text := IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('CORA_NL').AsInteger);
            dbeCAUC2.Text := IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('CAUC_NL').AsInteger);
            dbeDROP2.Text := IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('DRP_NL').AsInteger);
            dbeOtr2.Text  := IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('OTRAS_NL').AsInteger);
            dbeTPIED_VEN.Text :=IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('TPIED_NL').AsInteger);
            cbbLoDi.ItemIndex := cbbMoVe.ItemIndex;
            lbl77.Caption := cbbMoVe.Text;
            lbl78.Caption := cbbMoVe.Text;
            dbeMONED_VEN.Text := cbbMoVe.Text;
            dbeKilaC.Text := FloatToStr(GrdLoDi.DataSource.DataSet.FieldByName('KILATES_NL').AsFloat);
            dbeVAL_KIL1.Text:= FloatToStr(GrdLoDi.DataSource.DataSet.FieldByName('VAL_KIL_NL').AsFloat);
            dbeVAL_TO4.Text := FloatToStr(GrdLoDi.DataSource.DataSet.FieldByName('VAL_TO_NL').AsFloat);
      
         end;
       // query que hace el update de status tabla LOTE
      IBQueryTemp.Sql.Text:= 'Update Lote set Status = ''I'' where ID = '+
                             IntToStr(GrdLoDi.DataSource.DataSet.FieldByName('ID').AsInteger);
      IBQueryTemp.ExecSQL;

end;
Saludos
__________________
Siempre Novato
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Update duplica registro FerCastro SQL 22 28-10-2008 19:21:05
deadlock update conflict with concurrent update! JuanErasmo Firebird e Interbase 6 10-07-2008 20:58:10
Update!!!, pero solo para un registro ELINK Firebird e Interbase 6 08-01-2008 20:26:41
UPDATE con seccion llamada UPDATE sql's MyDAC karlaoax SQL 4 25-04-2007 22:10:50
Update registro - fallo con variable Gorehide SQL 4 13-07-2004 19:12:32


La franja horaria es GMT +2. Ahora son las 18:44:25.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi