AfterCloseTables

Close Tables

This command closes open tables. Big surprise. Except that sometimes it closes free tables and sometimes it doesn't.

Usage

CLOSE TABLES [ ALL ]
When a database is current, CLOSE TABLES closes all the open tables that belong to that database. With no current database, CLOSE TABLES closes all free tables. Add ALL to close all open tables, regardless of the current state of affairs or the origins of the tables. As with CLOSE DATABASES, work area 1 is selected.

From the point of view of this command (and pretty much everywhere else), views are considered tables in the database that owns them, while cursors created with SELECT or CREATE CURSOR are free tables.

In VFP 7, the BeforeCloseTable and AfterCloseTable events fire for tables that belong to a database with database events turned on.

Example

OPEN DATA TasTrade USE Customer IN 0 USE Employee IN 0 USE Orders IN 0   * Now one that's not in the database USE FoxUser * Now one from another database USE TestData!Customer   SET DATABASE TO TasTrade CLOSE TABLES      && Closes all tables from TasTrade. CLOSE TABLES ALL  && Closes FoxUser and TestData!Customer.                    && Both TasTrade and TestData are left open.

See Also

Close Databases, Open Database, Use


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net