Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to close all tables opened in a routine?
Message
De
13/04/2008 09:21:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01310216
Message ID:
01310225
Vues:
19
Dragan created FAQ #31943 for this purpose. Being encapsulated in a class, it should be less work using it, than coding every time. You create a single object that remembers open tables, and when the object is destroyed (this is automatic, when the variable gets out of scope!) it does the cleanup.

>Good morning,
>
>I would like to find a way to close all tables that are opened in a routine.
>
>Here is an example.
>
>
>*-- bookmark selected area
>nSelect = select()
>
>*-- Execute a Sql Select that opens one or more tables
>select * from mytable1 join mytable2 .. join mytable3.. etc.
>
>*-- Close all tables opened in the above SQL Select.
>
>*-- I believe I need to know the highest SELECT() at this
>point and scan it backwards until coming to nSelect.
>But how to determine currently highest SELECT()?
>
>
>
>Or if you think or can suggest a better method to accomplish it, I would appreciate it.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform