<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > ApolloDelete |
Declaration
procedure ApolloDelete;
Description
Flags the current record for deletion. If SetDeleted has been set to True, the record will become invisible to record movement functions. Record is not actually purged from the table until a Pack is issued. Until then, the record can be undeleted by calling Recall.
You generally would call the standard TDataSet-derived Delete method instead of ApolloDelete. However, when using SpeedMode, this method is a more direct connection to the underlying API, with no time wasted in updating data controls or firing events at all.
Delphi Example
// Deleted all non-deleted records, and
// recalls all previously deleted ones
with ApTbl do
begin
GoTop;
SpeedMode := True;
while not ApolloEof do
begin
if Deleted then
Recall
else
ApolloDelete;
Skip( 1 );
end;
end;
C++Builder Example
// Deleted all non-deleted records, and
// recalls all previously deleted ones
ApTbl->GoTop();
ApTbl->SpeedMode = TRUE;
while (!ApolloEof)
{
if (Deleted)
ApTbl->Recall;
else
ApTbl->ApolloDelete;
ApTbl->Skip( 1 );
}
See Also
Deleted, Pack, Recall, SetDeleted, Zap