FireDAC.Comp.Client.TFDAdaptedDataSet.ServerDeleteAll

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure ServerDeleteAll(ANoUndo: Boolean = False); virtual;

C++

virtual void __fastcall ServerDeleteAll(bool ANoUndo = false);

Properties

Type Visibility Source Unit Parent
procedure
function
public
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDAdaptedDataSet

Description

Deletes all records from an associated database table.

Use the ServerDeleteAll method to delete all records from a database table, specified in UpdateOptions.UpdateTableName, otherwise in SQL command or TableName property.

Set ANoUndo to True, to empty a table using the TRUNCATE SQL command, if DBMS supports it. Otherwise, method will issue DELETE SQL command without WHERE clause. Note, that on most DBMS's TRUNCATE command is not journaled and cannot be rolled back.

The ServerDeleteAll method may be used on inactive dataset.

Example

ADQuery1.SQL.Text := 'select * from {id MyTab}';
ADQuery1.ServerDeleteAll(True);

See Also