Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple Data Sessions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00316297
Message ID:
00316447
Vues:
11
Hi Erik,

That'll work. I think I can sell an upper limit of 25.

Thanks again, and congrats on the MVP -- you've earned it!

>>Hi gang,
>>
>>I have an unusual situation where an app requires the use of multiple data sessions, the number of which varies each time the application runs. Strangely, this application has NO USER INTERFACE (don't ask, and I won't tell < g > ), so anything to do with forms or the SET dialog won't work. I'm not allowed to rewrite this app, but I've been asked to make some "alterations" < s >.
>>
>>What I'm looking for is a way to tell how *many* data sessions are currently open and/or populated with an open DBC/table(s)/whatever. Anybody got any brilliant ideas/pieces of code that might accomplish this (ie, get it *off my plate* < BG >)?
>>
>>TIA.
>
>There is no VFP function that tells you how many and which datasessions are open. If you don't have object references to the forms or sessions objects that "own" the datasessions, the only way I know of to do this is to scroll through all (practically) possible datasessions:
>
>
>ON ERROR llValidSession = .F.
>FOR i = 1 TO 20 && Or whatever number you deem as the maximum possible
>	llValidSession = .T.
>	SET DATASESSION TO (i)
>	IF llValidSession
>		* Do whatever here
>	ENDIF
>ENDFOR
>
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform