FireDAC.Phys.MongoDBDataSet.TFDMongoCustomDataSet.ServerDeleteAll
Delphi
procedure ServerDeleteAll(ANoUndo: Boolean = False); override;
C++
virtual void __fastcall ServerDeleteAll(bool ANoUndo = false);
Contents
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
procedure function |
public | FireDAC.Phys.MongoDBDataSet.pas FireDAC.Phys.MongoDBDataSet.hpp |
FireDAC.Phys.MongoDBDataSet | TFDMongoCustomDataSet |
Description
Deletes all records from an associated database table.
FireDAC.Phys.MongoDBDataSet.TFDMongoCustomDataSet.ServerDeleteAll inherits from FireDAC.Comp.Client.TFDAdaptedDataSet.ServerDeleteAll. All content below this line refers to FireDAC.Comp.Client.TFDAdaptedDataSet.ServerDeleteAll.
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);