Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datasessions - thisform.release
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00090329
Message ID:
00090333
Views:
29
>>I have private datasessions for my forms and after the user is finished with a form they do a save (=tableupdate()) or cancel (=tablerevert()). the form is released and I would expect that to be the end of the datasession. The dataenvironment is set up to auto open and close the tables.
>>
>>However the datasession remains after the form is long gone. This interferes with the next form which might open up the same tables but with old values.
>>
>>Can anyone help me with the right strategy here?
>
>Sarah, the most common thing which can happen here - you have some outstanding object references in your form, so form doesn't get released and leaves the datasession open. It is not really gone. Check if you assigned any property to some object. You supposed to set such a property to .NULL. before you release your form.
>
>HTH,
>Nick

Hi Nick. Not sure about your answer. I have a "switchboard" type app and the main form has a method which calls the other forms. Part of it's code is responsible for making sure there are no other forms hanging around:
m.lncount = _screen.formcount
if m.lncount >= 2
for i = 2 to m.lncount
_screen.forms(i).release()
endfor
endif

I don't think I understand the bit about assigning properties to objects, I do that all the time - to the form, to it's fields, commands etc.

Sarah
Sarah King
pcpropertymanager.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform