Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine if a Datasession exists
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00140429
Message ID:
00140482
Views:
30
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform