Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to auto close main table after sql cursor selected
Message
From
12/10/2016 12:41:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
12/10/2016 04:00:31
Hee Lim Wang
Fantasy Software Enterprise
Malaysia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01641843
Message ID:
01641855
Views:
59
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform