Ver Mensaje Individual
  #5  
Antiguo 19-10-2017
Avatar de The Cid James
The Cid James The Cid James is offline
Miembro
NULL
 
Registrado: jun 2013
Posts: 129
Reputación: 11
The Cid James Va por buen camino
Cita:
Empezado por ecfisa Ver Mensaje
Hola.

Ahora creo entender... ¿ Estas usando un Query (qCliente) para alimentar el DBGrid y un DataSet (tCliente) para realizar los cambios no ?

Entonces el problema es el siguiente:
Código Delphi [-]
  fmodulo.tCliente.Active := true;
    if fmodulo.qCliente.Locate('id_cliente', fmodulo.qCliente['id_cliente'], []) = true // <== (1)
  then
    begin
      fmodulo.tCliente.Edit;
      tfcliente.Create(self).ShowModal;
    end;
        fmodulo.tCliente.Active := false;  // <=== ¡¡¡  (2) !!!
        fmodulo.qCliente.Refresh;
(1) ¿ El Locate no deberías aplicarlo al DataSet ?
(2) Esa línea elimina el posicionamiento anterior del Locate y el DataSet (tCliente), siempre queda apuntando al primer registro del DataSet.

Saludos
1-Como lo aplico al dataset?
2-entonces como cerraría la consulta para que no quede activa?

Gracias por la ayuda
Responder Con Cita