TMSTable->Delete() is very slow.
Is there a faster way to delete rows?
This is what I’m currently doing (All rows in table are deleted) in C++.
if(!dmSCT->MSTable_Delete->Eof)
{
do
{
dmSCT->MSTable_Delete->Delete() ;
}while(!dmSCT->MSTable_Delete->Eof) ;
}
Alan
TMSTable->Delete() is very slow
To delete all rows from a table you can use the "TRUNCATE TABLE" SQL statement, like this:
Code: Select all
MSQuery.SQL.Text := 'TRUNCATE TABLE tablename';
MSQuery.Execute;