Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Private DataSession Won't Close Out?!?
Message
From
18/10/2002 22:16:15
 
 
To
18/10/2002 14:45:17
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00711562
Message ID:
00713140
Views:
27
Gordon,

I read your other post on this thread about checking where the 2 dbc's are loaded, in what datasession. That was very interesting, I checked that theory out. Let me share with you what I learned.

Both DBC's I open in my 'Main.prg' when the application is first made, so they are first opened in the default datasession. And throughout the application whenever I either close or re-open these dbc's it is always done from that default data session. So, I just open them and leave them open. I only close and re-open when doing maintenance which only occurs when there are no other datasessions up and always from the default data session also.

I think that the DBC's don't actually get scoped to 1 datasession or the other. I think it doesn't matter where you open them, unlike tables, cursors and views of course.

So, as you read, it only malfunctions on this one form, I still can't figure out the reason. I am now manually closing out the data in that one form in Destroy. Then, the 'Unknonwn' datasession remains, but is empty. It doesn't affect anything at all. Except, in my maintenance procedures I noticed that when I try to CLOSE DATA for one of the 2 dbc's it would simply not close. I was closing out the dbc so I could either delete or restore the RELATION records and RI records in the System.dbc file. I got it to close by cycling through a lot of DataSessions and in each one issuing the command CLOSE DATA. If I'm referring to a datasession that doesn't exist, then it doesn't matter, no error results. I have no idea which one is the 'Unknown', but I just cycle through a bunch and it eventually works to at least allow me to 'USE System.dbc'. But even that does not close out the 'Unknown' datasession. But this is the only cost, the Unknown datasession doesn't go away, but has no effect.

So, in conclusion, I do have reason to believe the Unknown datasession phenomenon in this case has something to do with a DBC because that DBC won't close easily after this form is up. In this case it is not the need for 'garbage collection' I'm sure because when I merely load that form I don't create any objects. I checked thoroughly for this. The system I stumbled upon for closing out the DBC that doesn't want to close works despite what I believe that DBC's are not scoped to any 1 datasession.

Wally Noll
Previous
Reply
Map
View

Click here to load this message in the networking platform