Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Many Data Sessions?
Message
De
01/03/1999 21:50:50
 
 
À
01/03/1999 21:20:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00192961
Message ID:
00192983
Vues:
18
Okay. Good enough.


>>How do I know how many data sessions are currently open? Thanks.
>
>There is no direct way, but you can derive from the knowledge that only a form can create a datasession. So you can use some code like this:
>
>
>DIMENSION laDataSessions(1)
>laDataSessions[1] = 1 && 1 is always the default datasession
>
>FOR EACH oForm IN _SCREEN.Forms
>	lnDataSessionCount = ALEN(laDataSessions)
>	IF oForm.DataSession = 2 && PrivateDataSession
>		IF ASCAN(laDataSessions, oForm.DataSessionID) = 0 && Have we already added this one?
>			DIMENSION laDataSessions[lnDataSessionCount + 1]
>			laDataSessions[lnDataSessionCount + 1] = oForm.DataSessionID
>		ENDIF
>	ENDIF
>ENDFOR
>
>?ALEN(laDataSessions)
>
EMail: danielj@ryte-byte.com
"If I'm paddling so hard, how come I'm going backwards?" - Pinocchio (while the whale was swallowing him...)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform