Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing tables with private data session.
Message
 
To
26/06/2007 13:15:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01235725
Message ID:
01235781
Views:
14
Ok, I solved it.
It appears that only tables opened in the data environment are closed when the form is released. I checked some other forms where we are doing the same thing and the tables are staying open after the form is closed even though the form has a private datasession. You don't see them unless you select that datasession. I put the code below in my form Release method. I checked and at that point it is still in the private datasession. This gives us what we were assuming all along.

By the way, this might explain the random record locked problems we were having sometimes. That is what prompted me to look into this.
if thisform.DataSession = 2
  Close Databases all
  Close Tables all
endif
Thanks for the input guys,
John

>
>If the tables are opened in that session and session is released then tables are closed. It indicates that there is some dangling reference and your session is still alive (probably would show as "Unknown" if you check in VFP IDE.
>Cetin
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform