Many table type datasets supply a single method that lets you delete all rows of data in the table.
Table Type |
Method |
TTable and TIBTable |
You can delete all the records by calling the EmptyTable method at runtime: PhoneTable.EmptyTable; PhoneTable->EmptyTable(); |
TADOTable |
You can use the DeleteRecords method: PhoneTable.DeleteRecords; PhoneTable->DeleteRecords(arAll); |
TSQLTable |
You can use the DeleteRecords method. Note, that the TSQLTable version of DeleteRecords never takes any parameters: PhoneTable.DeleteRecords; PhoneTable->DeleteRecords(); |
EmptyDataSet |
For client datasets, you can use the EmptyDataSet method: PhoneTable.EmptyDataSet; PhoneTable->EmptyDataSet(); |
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|