Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
While a process is runing
Message
 
 
À
20/09/2001 13:17:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00555646
Message ID:
00559054
Vues:
33
Andrews,

It happend because you closed grid recordsource ("totconcurent") before you set it to the empty string.
Again if you have code in the form events that you need to call from other methods, move that code in the form custom method and call this method instead.

Add new method, say RefreshTotals, to the form
* Thisform.RefreshTotals()
* Set grid recordsource to the empty string to prevent grid "reconstruction"
thisform.malla.recordsource = ""
thisform.totales.recordsource = ""
* Close Cursors/tables
USE IN SELECT ("conexiones_actuales")
USE IN SELECT ("conexiones_act")
USE IN SELECT ("totconcurent")

* Recreate Cursors and restore grid recordsource
do consultas\conexionesact.qpr
thisform.malla.recordsource="conexiones_act"

select conexiones_act.tipo, count(conexiones_act.cliente);
	from conexiones_act conexiones_act;
	group by conexiones_act.tipo;
	into cursor totconcurent
thisform.totales.recordsource="totconcurent"
* ENDPROC

* Timer.Timer
Tisform.RefreshTotals()
* ENDPROC

* Thisform.Init
* ...
Tisform.RefreshTotals()
* ...
* ENDPROC
Also consider using RecordSourceType 3 - Query and 4 SQL and call grid Refresh() when timer fires.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform