Old Problem lazarus / 16-Databases ---------------------------------------------------------------------- Medhome · 2019-09-25 23:08 Hi All, I want to know if the topic https://forum.lazarus.freepascal.org/index.php/topic,25153.0.html is  resolved using last lazarus version? Regards Med ---------------------------------------------------------------------- Thaddy · 2019-09-26 06:57 You mean the problem that wasn't a problem? What exactly do you mean? And what database are you using? Usually you should write an SQL query returning count, but not all databases support count for deletions. "Is your son really called Drop Table?" "Yes, dear Bobby Table" https://xkcd.com/327/ ---------------------------------------------------------------------- Medhome · 2019-10-01 11:52 The status of dataset  returns usUnmodified instead  usDeleted when the record is deleted  from dbgrid using  dbnavigator ]-. Any idea? ---------------------------------------------------------------------- rvk · 2019-10-01 12:17 Quote from: Medhome on October 01, 2019, 01:52:06 pmThe status of dataset  returns usUnmodified instead  usDeleted when the record is deleted  from dbgrid using  dbnavigator ]-. Any idea? Like Thaddy already suggested... there is no problem. Did you read the description of UpdateStatus? What it does? QuoteUpdateStatus always returns usUnModified in the TDataset implementation. Descendent classes should override this method to indicate the status for the current record in case they support cached updates: the function should return the status of the current record: has the record been locally inserted, modified or deleted, or none of these. UpdateStatus is not used in TDataset itself, but is provided so applications have a unique API to work with datasets that have support for cached updates.https://www.freepascal.org/docs- html/current/fcl/db/tdataset.updatestatus.html So it should reflect the state of the current record in case the dataset supports cached updates (i.e. the operation isn't done yet). Not as you expect the state of a complete dataset after a certain operation. This is the same implementation as in Delphi: QuoteusDeleted - The current record represents a deleted record, where the deletion has not yet been applied.http://docs.embarcadero.com/prod ucts/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/DB _TUpdateStatus.html The only TDataset that supports it (as far as I can see) is TBufDataset. ---------------------------------------------------------------------- Thaddy · 2019-10-01 13:49 And Tdbf, because dBase format actually keeps and marks deletions. At the cost of a lot of overhead.