SQLite, cannot commit transaction. sql statements in progress lazarus / 16-Databases ---------------------------------------------------------------------- Elmug · 2012-06-27 08:45 Hi everyone, Using SQLite3Connetion. One-table form, using grid, correctly loads data from the one row in the table. I can edit directly in the Grid, and I press a button called Commit, which does the following:    SQLQuery1.ApplyUpdates;    SQLTransaction1.CommitRetaining; The changes update correctly. The problem is when inserting a row using the + button of the Navigator. I press the + button of the Navigator, and an empty record shows. I enter some data into its fields, and press the same Commit button, which results in cannot commit transaction - SQL statements in progress A similar simple project worked fine using PostgreSQL, by the way (using a Commit button updates the table with the inserted record). Would appreciate some suggestions and help to resolve this. ---------------------------------------------------------------------- ludob · 2012-06-27 11:02 Have you set SQLQuery.PacketRecords :=-1 ? When you don't, the data will be retrieved in packets from the resultset (default 10 records) and, as long as the select statement is still active (not all data read), you can't commit the transaction. SQLQuery.PacketRecords :=-1 will read all records in one go. ---------------------------------------------------------------------- Elmug · 2012-06-27 20:25 Great, ludob. I will apply to your advice as I plan to resolve this today. Will get back when so done. Thanks!