Bde.DBTables.TTable.EmptyTable

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure EmptyTable;

C++

void __fastcall EmptyTable();

Properties

Type Visibility Source Unit Parent
procedure
function
public
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TTable

Description

Deletes all records from the table.

The EmptyTable method deletes all records from the database table specified by the DatabaseName and TableName properties. To use EmptyTable, you need to call Close to close the table. Also you need to set the Exclusive property to True.

Note: Deletion of records can fail if the user lacks sufficient privileges to perform the delete operation.

Note: If you are using a TTable component in the IDE, you need to set its Active property to False before running the application to call the EmptyTable method; otherwise a EDBEngineError will be raised with the message "Table is busy", because there are two instances of TTable: one that is active in the IDE and one that is instantiated at run time.

See Also

Code Examples