How to Verify If a Table Is Free or Belongs to a Database

Last reviewed: March 10, 1998
Article ID: Q136771
3.00 WINDOWS kbprg

The information in this article applies to:

  • Microsoft Visual FoxPro for Windows, version 3.0

SUMMARY

This article explains how to determine if a table (.dbf file) is a free table or belongs to a database.

MORE INFORMATION

Programmatic Test

Run the following code to determine if a table is free or belongs to a database:

     xyz = CURSORGETPROP("database")
     IF EMPTY(xyz)
        WAIT WINDOW "This is a free table!"
     ELSE
        WAIT WINDOW "This database " + xyz +" is open!"
     ENDIF

You can use a low-level utility or Visual FoxPro low-level functions to verify the content of the .dbf header.

REFERENCES

For more information about Visual FoxPro low-level functions, please see the following:

Visual FoxPro Help; search on: "Low-Level Functions"

For more information on the table header structure, type "HELP FILE STRUCTURES" in the Command window to display online Help consisting of a list of file types. Select Table File Structure (.dbc, .dbf, ..... ), and click the Display button. You will see the Table Header Record Structure.


Additional reference words: 3.00 VFoxWin on-line online
KBCategory: kbprg
KBSubcategory: FxprgTable
Keywords : FxprgTable kbprg
Version : 3.00
Platform : WINDOWS


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.

Last reviewed: March 10, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.