Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which type of class to use?
Message
From
04/01/2005 22:16:09
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00973101
Message ID:
00974273
Views:
24
>What I'd like to see is a global or shared datassession that could be accessed from within many private datasessions. That way system tables could be opened and referenced there and still have the benefit of private datasessions for specific type application data. Closing the private datasession would only close those tables, leaving the "shared" session open.

Well datasession id 1 is the "global" session, and sometimes I will simply create a cursor in that session from within a private datasession by using "set datasession " command. Any tables required are simply "use again" so there's no apparent speed penalty.
eg say we are in datasession id 5
set datasession to 1
lUsed= used('mytable')
select * from mytable where <somecondition> into cursor mycursor
if ! lused
  use in mytable
endif
set datasession to 5
In reality I'd use a few properties to do this more neatly; but you get the idea?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform