[Solved] SQLite3 - Delete a row with a SQLQuery in a DBGrid lazarus / 16-Databases ---------------------------------------------------------------------- folkeu08 · 2020-11-24 18:04 Hi, I create an example to insert, edit and delete data in a table under SQLite3. The insertion works. I am trying to delete a row of data from the table from part of the row from the DBGrid with an SQLQuery. I have a problem with the procedure. Despite the error, if I force the source to continue, the selected row is deleted. The error tells me that the dataset is only read-only. I have checked all the readonly properties of the components and the grid, they are indeed false. I don't see where the problem could be other than in the component properties. Thank you for your help and I have attached my source to you Fanch ---------------------------------------------------------------------- Slyde · 2020-11-25 18:58 myExamplePackage is missing from your files, so I can't run your program.  That said, all of your code and components looks to be in order.  I saw nothing set to Read Only. Your Query gets executed and deletes the record from your database: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Cellule_SQLQuery.SQL.Text := 'delete from Cellule where id_cellule = '+ quotedStr(IntToStr(str))+';' ;Cellule_SQLQuery.ExecSQL; and then you make this call: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Cellule_SQLQuery.Delete; That might be your problem.