Tuesday, June 14, 2011

Deleting a Free Table

If a table is not associated with a database, you can delete the table file through the Project Manager or with the DELETE FILE command.

To delete a free table
  • In the Project Manager, select the free table, choose Remove, and then choose Delete.
-or-
  • Use the DELETE FILE command.

For example, if sample is the current table, the following code closes the table and deletes the file from disk:

USE
DELETE FILE sample.dbf

The file you want to delete cannot be open when DELETE FILE is issued. If you delete a table that has other associated files, such as a memo file (.fpt) or index files (.cdx or .idx), be sure to delete those files as well. For  example, if the file sample.dbf also has an associated memo file, you could delete both files with the following  commands:

USE
DELETE FILE sample.dbf
DELETE FILE sample.fpt

No comments:

Post a Comment