SQLite3 Problem with saving changed record [SOLVED] lazarus / 16-Databases ---------------------------------------------------------------------- LumirP · 2011-05-06 06:39 Hi All,  I have a problem with saving changed record in SQLite3 DB. If I use  add new record than I will save it and I will use comand  "ApplyUpdates" ... in this case is everything OK. The record is saved. But if I only change item and then I will save It  and  Iwill use  "ApplyUpdates" the changed record is not saved. Nowhere any message. Everything seems to be OK but record is unchanged. I use Lazarus 0.9.31, Windows Vista. For communication with SQLite3 I use Components: TSqlite3Dataset,TDatasource,TDBGrid. Does anybody know why It is not working ? Or what other components can I use for working with SQLite3 DB Thanks for advices ---------------------------------------------------------------------- sasa · 2011-05-13 09:41 You can try Zeos, but beta version 7.x, not the "stable" 6.6.6. I have not tested new version yet (though), but with "stable" release I accomplish nothing - constant AVs. ---------------------------------------------------------------------- LuizAmérico · 2011-05-13 09:51 http://sqlite4fpc.yolasite.com/documentation.php ---------------------------------------------------------------------- LumirP · 2011-05-14 20:13 I can see that for communication with SQLite3 is it used another components then they are native in Lazarus. It is shame that does not work properly. I will try new one which you recommended to me and I will see if it is problem somewhere else. Thank you for a tip. ---------------------------------------------------------------------- LuizAmérico · 2011-05-14 23:28 QuoteIt is shame that does not work properly Did you read the documentation? Did you tried the examples/tutorials found in the documentation? It seems not ---------------------------------------------------------------------- NelsonN · 2011-05-15 00:32 Quote from: LumirP on May 06, 2011, 08:39:58 amIwill use  "ApplyUpdates" the changed record is not saved. I know exactly what your problem is, you are not committing the changes. ---------------------------------------------------------------------- sasa · 2011-05-15 04:40 LumirP, Can you attach quite simplified project in order to efficiently solve the problem you have? BTW, I have tested Zeos 7.x with SQLite 3 (latest libarary) and it works fine, ATM. ---------------------------------------------------------------------- LumirP · 2011-05-15 11:57 Hi  All, I have tried what  LuizAmérico advised to me. The examle works properly but my application not. I could not find out what I do wrong. I perused documentation but above all FAQ. For correct working is necessary. Quote In order to ApplyUpdates work is necessary to define a primary key. It can be done in two ways:     * Set PrimaryKey property to the name of a Primary Key field     * Add an AutoInc field (This is easier since the TSqlite*DataSet automatically handles it as a Primary Key) My problem is solved. Thanks a lot to All.