Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Many Data Sessions?
Message
From
01/03/1999 21:50:50
 
 
To
01/03/1999 21:20:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00192961
Message ID:
00192983
Views:
17
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...)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform