Ver Mensaje Individual
  #10  
Antiguo 28-02-2012
agustinbus agustinbus is offline
Miembro
 
Registrado: ago 2007
Posts: 44
Reputación: 0
agustinbus Va por buen camino
Unhappy

Realice los cambios en los campos de la tabla Mesas y cambie el codigo que quedo de la siguiente manera:

Código:
var
  CompName:String;
  comp : TComponent;
  ctrl : TControl;
begin
  QMesas.First;
  while not QMesas.Eof do
    begin

      CompName := QMesasCODIGO.Value;
      comp := Self.FindComponent(CompName);
      if Assigned(comp) then
        begin
          SelectOnRunTime1.SelectControl := TControl(comp);
          //SelectOnRunTime1.Selected := True;
          ctrl := SelectOnRunTime1.SelectControl;
        end;
      with QMesas do
        begin
          Close;
          SQL.Clear;
          SQL.Add('UPDATE MESAS SET ANCHO = :ANC, PERSONAS = :PER, ALTO = :ALT, ARRIBA = :ARR, IZQUIERDA = :IZQ ');
          SQL.Add('WHERE CODIGO = :COD');
          ParamByName('ANC').Value := ctrl.Width;
          ParamByName('ALT').Value := ctrl.Height;
          ParamByName('PER').Value := ctrl.Tag;
          ParamByName('IZQ').Value := ctrl.Left;
          ParamByName('ARR').Value := ctrl.Top;
          ParamByName('COD').Value := Form1.QMesasCODIGO.Value;
          ExecSQL;
          Open;
          Next;
        end;
    end;
Pero al realizar la actualizacion no se guardan los cambios. Firebird me esta dando dolores de cabeza!
Responder Con Cita