Visual dBase - Actualizar form

 
Vista:

Actualizar form

Publicado por Abaddon (1 intervención) el 05/02/2008 23:14:18
Hola comunidad,

Tengo un problema. He generado una aplicación de entrada de visitas que trabaja en 2 terminales, el problema es que cuando introduzco una visita en un terminal, no me lo actualiza en le otro.

Las visitas se ven en un GRID y solo si accedo a el y lo muevo se actualiza con los nuevos datos.

¿ Como puedo solucionarlo ?

Gracias,
Abaddon
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Actualizar form

Publicado por jabertos (10 intervenciones) el 18/02/2008 23:06:25
de las ayudas del dbase he tomado esto:

SET REFRESH TO <expN>
Determines how often dBASE Plus refreshes the workstation screen with table information from the server.
Syntax
<expN>
A time interval expressed in seconds from 0 to 3,600 (1 hour), inclusive. The default is 0, meaning that dBASE Plus doesn’t update the screen.
Description
Use SET REFRESH to set a refresh interval when working with shared tables on a network. Then, when you use BROWSE or EDIT to edit shared tables, your screen refreshes at the interval you set, showing you changes made by other users on the network to the same tables.
If another user has a lock on the file or records you're currently viewing, the file or records won't be refreshed until that user releases the lock.
OODML
Use a Timer object to periodically call the Rowset object’s refreshControls( ) method.

En su caso, como es un Grid, creo que tendrías que aplicar lo del Timer object, programándolo cada cierto tiempo (pueden ser hasta milisegundos, pero cuidado, puede dedicar mucho tiempo la CPU al programa un exceso de interrupciones)

un ejemplo (no probado totalmente) de uso:
this.timer = new Timer()
this.timer.parent = this // Assign form as timer's parent
this.timer.onTimer = this.updateClock // Assign method in form to timer
this.timer.interval = 0.02 // Fire timer every 0.02 seconds
this.timer.enabled = true // Activate timer

return

function updateClock()
form.grid.refreshControls()

no olvidar de dar Close al Timer !

suerte
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar