Bde.DBTables.TTable.EmptyTable

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
Bde.DBTables.pas
Bde.DBTables.hpp
Unit: Bde.DBTables
Parent: TTable

Delphi

procedure EmptyTable;

C++

void __fastcall EmptyTable();

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