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!