ApplyUpdates does not save changes lazarus / 16-Databases ---------------------------------------------------------------------- carlangas · 2010-12-04 15:47 I'm trying to update records in a Sqlite database and cannot update them. I use TSqlite3DataSet. The thing is that I have some tables. Trying to learn, I made a simple one this way:  SQL:=CREATE TABLE IF NOT EXISTS Prueba (Id INTEGER PRIMARY KEY AUTOINCREMENT, Name VARCHAR);  bd.Query(SQL,nil); If I do the following:  with TabPrueba do  begin    Open;    Append;    FieldValues['Name']:='SDA';    Post;    ApplyUpdates;  end; it creates another record with that name and the next Id. But if I change Append to Edit, the record (where Name field is empty) seems to be modified only until I close the program, when I start it again, no text is in the Field; I have tried FieldByName as well, but it behaves the same. What am I missing? ---------------------------------------------------------------------- LuizAmérico · 2010-12-04 23:26 http://sqlite4fpc.yolasite.com/faq.php  Q06 ---------------------------------------------------------------------- carlangas · 2010-12-05 13:00 Thanks, Luiz, now it seems to work. It's not the 6th question, but the 5th. Somehow it does not work correctly if you don't create the table that way. And if I want to create an index, wich is the preferred way? The IndexFieldNames property of the dataset?