Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What datasessions are open?
Message
From
09/12/2004 18:01:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
09/12/2004 16:45:06
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
00968147
Message ID:
00968175
Views:
10
This message has been marked as the solution to the initial question of the thread.
>I need to check if a particular table is opened in a previously-opened form which has a different datasession from the current form. In VFP7/8 I can use ASESSIONS(laMyArray), but until I can persuade the client to upgrade, I am stuck with VFP6.
>
>Using AUSED(laMyArray,lnDataSession) in a FOR/ENDFOR loop, I can determine the tables open in a particular datasession, but
>a) I don't know when to stop checking datasessions (15 should be enough, but guessing is not very 'neat'),
>b) If the datasession does not exist, the error "Session number is invalid" occurs.
>
>How can I check if a datasession exists or not?
>
>Any help would be appreciated.
>
>Alan

Alan,
I'm away from documentation and do not have VFP6 here to test. When was session object introduced? If not in VFP6 (or you didn't use session object) then the only object having private sessions is form(set)s. Loop that collection, set datasessionId to forms(i).dataSessionID.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform