General information
Category:
Coding, syntax & commands
>>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"), "")
Many app objects also store a reference to forms that are currently displayed. You could use the concept above and roll through the form references to get the .DataSessionID property.
Steve
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only