Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine if a Datasession exists
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00140429
Message ID:
00140482
Vues:
31
>Is there a way to determine if a datasession is open/valid?
>
>Ie
>IF DATASESSIONEXISTS(x)
>SET DATASESSION TO (x)
>...
>ENDIF
>
>Wayne

Not in VFP 5 (don't know about 6). The best I could suggest is have a property in an App object to track this.

In the App class
oApp = creatobject("AppManager") && whatever
oApp.DSIDs = ""

In form class Init:

oApp.DSIDs = oApp.DSIDs + ";" + padl(This.DataSessionID, 3, "0") && pad with zeros

In form QueryUnload

oApp.DSIDs = strtran(oApp.DSIDs, ";" + padl(This.DataSessionID, 3, "0"), "")
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform