Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to auto close main table after sql cursor selected
Message
De
12/10/2016 12:41:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
12/10/2016 04:00:31
Hee Lim Wang
Fantasy Software Enterprise
Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01641843
Message ID:
01641855
Vues:
60
>select * from mytable into cursor tmp where.......
>but mytable.dbf still open after tmp cursor formed
>is there any way to close mytable automatically after selected ?

I wouldn't worry about doing that in the first place, for several reasons.
* If you keep the tables open, it's faster to run the query again next time. Some forms/processes may need to run a query more than once. Or other queries, based on the same tables.
* Both tables and cursors are closed automatically, once the form that opened them is closes. This assumes, of course, that you use a private datasession, AS YOU SHOULD, most of the time at least.
* Similarly, tables and queries opened in one form don't interfere with tables and queries with the same name, opened in other forms. Once again, this assumes you use a private datasession.
* So, the open tables don't cause any real harm.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform