Can't make TSQLQuery delete record[Solved] lazarus / 16-Databases ---------------------------------------------------------------------- panoss · 2014-12-04 11:04 I have a a TSQLQuery named 'qryItems' in datamodule 'DM'. Me DeleteSLQ in the qryItems is: Code: [Select]DELETE FROM Items WHERE ItemID=:ItemID; The code in the button btnDelete.click: Code: [Select]  with DM.qryItems do   begin     try       Delete;       ApplyUpdates();     except       on E: Exception do       begin         ShowMessage('Problem with deleting: ' + E.Message);         DM.Transaction.Rollback;       end;     end;     Close;     Open;     Refresh;   end;  But the record doesn't get deleted. ---------------------------------------------------------------------- panoss · 2014-12-04 11:15 Ok, I found it, it needs  'DM.Transaction.Commit;' after 'ApplyUpdates();