Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Many Data Sessions?
Message
De
03/03/1999 07:53:08
 
 
À
01/03/1999 21:50:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00192961
Message ID:
00193498
Vues:
17
Here's a method I use to determine the highest datasession number--the algorithm looks something like this:

FOR i = 1 TO
SET DATASESSION TO &i
check if an error occurred
if no error occurred
i is now the highest known datasession
endif
ENDFOR

If you want to know how many datasessions exist rather than the highest number, just change the logic to count rather than find the high datasession id.

The art here is guessing how high to set so you don't miss any datasessions balanced against the time it takes to check each one (you don't want to check all 32K of the possibilities). I just pick some reasonable number, but you could also develop more sophisticated logic, such as: keep checking datasessions until you find 10 (or whatever) sequential unused datasessions.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform