Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dangling Datasessions
Message
From
23/02/2001 01:28:32
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
22/02/2001 20:01:18
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00478620
Message ID:
00478713
Views:
22
>>Just noticed something which I can't believe hasn't tripped me up in the past...
>>
>>If I open a form with a private datasession using DO FORM, then return .f. in the INIT, the datasession stays open, I assume because the reference to that form is not released, but rather converted to .NULL. (according to the debugger).
>>
>>To get around the issue, I've set a flag which I check at the ACTIVATE event, and if need be, release the form there, which eliminates the reference to the form and thus closes the datasession.
>>
>>Is it possible to have the datasession close if I return .f. in the INIT?
>
>Two ways out of this (as far as I can see), one is to return .f. from the form.load, so the DE never gets a chance to exist, or to try thisform.dataenvironment.release from the form.init before returning .f. - which I'm also not quite sure will work (and can't launch Fox right now to try).

Just tried and it doesn't work - DE doesn't have a release method, and can't set it to .null. either (the load returning .f. still works). The only possible reason I think a DE may remain dangling is uncommited changes in some of th ebuffers - a PK violation or something like that.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform