First attempt Lazarus & SQLite - inserts do not work for me lazarus / 16-Databases ---------------------------------------------------------------------- kpeters58 · 2012-10-22 17:00 Hi all, am struggling with my first attempt at Lazarus (1.02)/SQLite/TSQLQuery My database has one table: CREATE TABLE contacts (    id      integer primary key,    name    varchar(30) not null,    address varchar(30) not null,    city    varchar(30) not null ); I am using these components: Dbgrid, dbnavigator, datasource, sqltransaction, sqlquery and sqlite3connection. SQLquers's SQL statement is 'select * from contacts' I see the records in the grid and can navigate via navigator just fine. I enter a new record and post it; in the form's close event I do sqlquery.applyupdates(0) which runs without problems. However, the new record(s) do not make it into that table. SQLQUery's UsePrimaryKeyAsKey is True and the ID fields Providerflags pfInKey is set (I see the key symbol next to it) What am I missing? Thanks for any pointers, Kai ---------------------------------------------------------------------- ludob · 2012-10-22 17:08 QuoteWhat am I missing? A sqltransaction.commit. ---------------------------------------------------------------------- kpeters58 · 2012-10-22 17:16 Thanks - should be mentioned in the TSQLQuery wiki page... ---------------------------------------------------------------------- BigChimp · 2012-10-22 17:30 Go right ahead ---------------------------------------------------------------------- eny · 2012-10-22 18:16 Off the top of my head I recall there is an issue with the DBNavigator and SQLite. Pressing the OK button is not enough to persist data (data is visible on screen, not persisted). Even though what would seem logical. You 'manually' have to commit the data as ludob suggested.