How to Enumerate and Open All Tables in a Database ContainerID: Q132726 The information in this article applies to:
SUMMARYThis article shows by example how to use the ADBOBJECTS function in a program to determine the names of all tables contained within a database container (.DBC file), and then use the resulting array to open all tables.
MORE INFORMATIONThe following program creates an array (laTableNames) containing the names of all the tables in the Tastrade.dbc sample database container. The FOR loop then opens each table in its own work area. The name of each table is displayed in the upper-right corner of the screen as it is opened.
Code Sample** Begin Code Example CLOSE ALL OPEN DATABASE c:\vfp\samples\mainsamp\data\tastrade lnNumOfTables = ADBOBJECTS(laTableNames, "Table") FOR i = 1 to lnNumOfTables ENDFOR
SET VIEW ON
** End Code Example
Additional reference words: 3.00 VFoxWin KBCategory: kbprg kbcode KBSubcategory: FxprgTable |
Last Reviewed: July 31, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |