Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Objects and DataSessions
Message
From
05/08/2005 10:26:36
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Objects and DataSessions
Environment versions
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01038878
Message ID:
01038878
Views:
66
Can someone explain to me how objects and datasessions interact? I have a routine that uses Stonefields Repair function but I have been having trouble ensuring that tables can be opened exclusively. My code is doing something like this:
Close all databases in all datasessions
set datasession to 1
Attempt to open the DBC as a file exclusively
If OK then
reopen the dbc by calling oapp.openshared()
call the Stonefield repair all function

Because all databases have been closed I have to reopen the database before calling repair. I call a function - oapp.openshared(). As soon as I do that I find that I am in datasession 4. My question is - Why does going into an object method automatically change my datasession? I think I have missed something fundamental to VFP. Any help greatly appreciated...
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Next
Reply
Map
View

Click here to load this message in the networking platform