Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does this datasession exist?
Message
De
28/08/2003 07:45:14
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
28/08/2003 06:00:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00824110
Message ID:
00824125
Vues:
17
This message has been marked as the solution to the initial question of the thread.
>Hi All,
>
>Does anyone know of a way to find out whether a certain Datasession number is currently in use? The function AUSED( laUsed, 10 ) will generate an error if that number (10) is still not in use.

Peter,
VFP7 and later has asessions() to get available sessions.
Prior to VFP7 only VFP6 has session object (if I remember right), others could only have private sessions through forms. You could access and loop session and form objects with _vfp.objects and get datasessionIDs into an array. ie:
local array laSessions[1], laUsed[1]
local ix
laSessions=1 && Default
for ix=1 to GetSessions(@laSessions)
 ? aused(laUsed,laSessions[ix])
endfor

function GetSessions
lparameters taSessions
local ix
for ix=1 to _vfp.objects.count
  with _vfp.objects(ix)
    if type('.Datasession') = 'N' and .Datasession = 2
	dimension taSessions[alen(taSessions)+1]
	taSessions[alen(taSessions)] = .DataSessionID
    endif
  endwith
endfor
return alen(taSessions)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform