Ver Mensaje Individual
  #7  
Antiguo 20-05-2010
eneseme eneseme is offline
Registrado
 
Registrado: may 2010
Posts: 7
Reputación: 0
eneseme Va por buen camino
.

Así funciona :

cod.Text := '7';
T_Est.locate('Cod',Vararrayof([Cod.text]),[loCaseInsensitive]);
Q_Est.SQL.Text := 'Update Estab set Nombre = "XXX" where Cod =' + cod.text;
Q_Est.ExecSQL;

// Ha Quedado modificado el registro
T_Est es un TZTable
Q_Est en un TZQuery

Así no funciona :
cod.Text := '7';
T_Est.locate('Cod',Vararrayof([Cod.text]),[loCaseInsensitive]);
T_Est.edit;
T_Est.FieldByName('DescExp').asstring := 'XXX';
T_Est.post;
T_Est.applyUpdates;
T_Est.Commitupdates;
// Cuando cierras la base, y luego la abres, no ha modificado el registro
Responder Con Cita