Skip to content

Delete_Db

See Also: Copy_DB, Zerofile

Purpose

Deletes a database table.

Syntax

Delete_Db {table} [IGNORE_ERRORS]

Where {table} is the name or filelist number of one or more database tables. The IGNORE_ERRORS parameter suppresses all errors. This can be used when deleting a table that may or may not exist.

What It Does

Delete_Db deletes a database table. All the components of the data table are destroyed. Native DataFlex tables consist of .DAT, .K, .TAG, .FD, and possibly .VLD files.

Example

Delete_Db "Vendor"

In this example, the database table Vendor is deleted. If the vendor table is number 6 in the filelist, then the following command line would be equivalent:

Delete_Db 6

Notes

  • No variable table numbers may be used with this command.
  • Use this command with caution. Once a database table is deleted, it cannot be recovered.
  • You can pass either the table's logical name or its table number (in FILELIST.CFG) to the Delete_Db command.
  • Delete_Db will attempt to gain exclusive access to the table. If it cannot do so (e.g., if the table is in use by someone else), the command will fail.
  • Delete_Db will delete open tables—it doesn't make any difference whether or not the table is open.