Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Session not closing
Message
 
 
À
26/07/1998 21:26:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00121526
Message ID:
00121539
Vues:
13
>I had gotten used to the data session closing when a form is closed, and any tables that had been opened while the form was intantiated were closed.
>Now I'm discovering that the data session is remaining open after closing the form, and any tables that were opened are still Used(). Only the tables specifically listed in the data environment are being closed.
>
>I have AutoCloseTables=.t. which is why the tables in the data environment are being closed, but why aren't the others being closed and the data session being removed (it's listed in the 'Data Session Window' as Unknown(2) or Unknown(3) etc.)

VFP 5 is much better than 3.0 at closing the datasessions correctly. I find that when I get "Unknown" datasessions, it is because there is a dangling object reference on the form or to the cursor objects in the dataenvironment of the form.

If that is not the case, you may just want to loop through the workareas closing tables (although there are 32767!). Another approach would be to have a standard method on the form for opening tables, which will log the alias names in an array, and then walk the array closing the tables.
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform