DOCUMENT:Q129917 10-FEB-2000 [foxpro] TITLE :How to Determine Which Tables Exist in a DBC PRODUCT :Microsoft FoxPro PROD/VER:WINDOWS:3.0 OPER/SYS: KEYWORDS:kbcode ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, version 3.0 ------------------------------------------------------------------------------- SUMMARY ======= In Visual FoxPro for Windows 3.0, you can use the ADBOBJECTS() function to find out which tables exist in a database container. MORE INFORMATION ================ The syntax for the ADBOBJECTS() function is as follows: ADBOBJECTS(arrayname,csetting) The arrayname parameter specifies the name of the array in which the names are placed. If the array you specify doesn't exist, Visual FoxPro automatically creates the array. If the array exists and isn't large enough to contain all the names, Visual FoxPro automatically increases the size of the array to accommodate the names. If the array is larger than necessary, Visual FoxPro truncates the array. If the array exists and ADBOBJECTS( ) returns zero (0) because no names are found, the array remains unchanged. If the array doesn't exist and ADBOBJECTS() returns zero (0), the array isn't created. The cSetting parameter specifies which names to place in the memory variable array. The following table shows the allowable values for cSetting and the corresponding names placed in the array: cSetting Names --------------------------- CONNECTION Connection names RELATION Table relationships TABLE Table names VIEW View names The following example code demonstrates how to determine which tables exist in a DBC: OPEN DATABASE C:\VFP\SAMPLES\DATA\testdata.dbc =ADBOBJECTS(tablearry,"TABLE") DISPLAY MEMORY LIKE tablearry Additional query words: VFoxWin ====================================================================== Keywords : kbcode Technology : kbVFPsearch kbAudDeveloper kbVFP300 Version : WINDOWS:3.0 ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2000.