DeleteTableFiles()

Summary

Deletes all files associated with a table.

Syntax

DeleteTableFiles(string class, string primary, string secondary)

Argument Contents
class Class of table (FFA, FFB, CSV or dBASE)
primary Primary filename for table
secondary Secondary filename for table

Notes

  • The file types include FFA for fixed-format text (ASCII), FFB for fixed-format binary, and CSV for comma-separated text (values).

  • DeleteTableFiles() cannot be used if the table is in use (e.g., the table is displayed in an editor, or is part of a joined view).

  • DeleteTableFiles() cannot be used on a geographic file.

  • DeleteTableFiles() deletes all data files, dictionary files, and index files associated with the table.

  • A secondary file name can be used for index files that have a different file name from the table file.

Example

DeleteTableFiles("DBASE", "employee.dbf", "employee.mdx")

Error Codes

Error Type Meaning
Error The input view is not a table (it is a joined view); the input table is an ODBC table or a geographic layer; the input class is not a recognized class; or a file I/O error occurred that prevents deletion of some files because the user does not have file access, or a file is in use
NotFound The table does not exist, i.e., the supplied class, primary, and secondary arguments do not specify a table

See Also

Function Summary
ListTableFiles() Lists all the files associated with a table or view
RenameTableFiles() Renames all files associated with a table or view
CopyTableFiles() Copies all files associated with a table