Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Firebird e Interbase (https://www.clubdelphi.com/foros/forumdisplay.php?f=19)
-   -   Problema de actualizacion (https://www.clubdelphi.com/foros/showthread.php?t=28864)

Luis Castillo 04-01-2006 23:28:21

Problema de actualizacion
 
a ver colegas....

Tengo un problema de actualacion de tablas. EStoy trabajando en interbase con delphi 7 y utilizando IBDataSet.

Cuando actualizo en la tabla T1 la cual tiene campos de busqueda que hacen referencia en la tabla T2.....(para mostrar un nombre y no un codigo) Entonces por medio de un boton muestro una forma donde actualizo la tabla
T2, pero cuando expando el campo de busqueda de la table T1 no me muestra el nuevo valor ingresado. Tengo entonces que abrir y cerrar la tabla.

Que puedo hacer para actualizar automaticamente eso. (creo que en paradox funcionaba)

Gracias

luisgutierrezb 05-01-2006 02:43:08

no estoy seguro si el IBDataset lo tiene, pero porque no buscas la propiedad "ReQuery" para actualizarlo

kalimero 05-01-2006 10:15:38

Hola.
Tienes que refrescar los datos del Dataset que hace referencia a T1.
No utilizo los IBX pero imagino que dataset.refresh ó haciendo un close y un open te refescara los datos

Saludos

Luis Castillo 05-01-2006 19:13:06

Refrescar...
 
A ver....yo se que abriendo y cerrando se actualiza.....pensaba que habria algun metodo mas implicito...

aledieb 05-01-2006 20:28:18

Probaste el refresh, supongo que si.

También existe
Cita:

Refetches the active record and the records that precede and follow it.
type TResyncMode = set of (rmExact, rmCenter);
procedure Resync(Mode: TResyncMode); virtual;
Description
Resync is used internally by other dataset methods to resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position. Applications should use the Refresh method instead of calling Resync.
Mode indicates optional processing that Resync should handle. If Mode contains rmExact, Resync raises an exception if Resync is called when the cursor is not positioned on a valid record. If Mode contains rmCenter, Resync positions the active record in the center of all buffered records.
Regardless of Mode, Resync also activates the buffers for the active record, retrieves prior and subsequent records for display purposes, and triggers a dataset change event.
No probe este ultimo metodo, pero se supone que realiza un refresco del query.

Espero que te sirva


La franja horaria es GMT +2. Ahora son las 07:22:37.

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