Problem with sqlite lazarus / 16-Databases ---------------------------------------------------------------------- satyro · 2009-04-08 12:11 Hi, i have want update a table with a data from anather table, my scprpt this is:  Code: [Select].... .... sqlFattMia: TZQuery; sqlEditComuni: TZQuery; .... .... sqlFattMia.edit; sqlFattMia.FieldByName('field1').AsString := sqlCF.FieldByName('field1').AsString; sqlFattMia.FieldByName('field2').AsString := sqlCF.FieldByName('field2').AsString; sqlFattMia.Post; but the table no update i modify the script in this mode Code: [Select]field1 := sqlCF.FieldByName('field1').AsString; field2 := sqlCF.FieldByName('field2').AsString; sqlEdit2.SQL.Text:='update mytable set field1="'+field1+'", field2="'+field2+'" where id ="'+id+'"'; sqlEdit2.ExecSQL; but not nothing happened What's wrong? there is to say that the TZConnection is set to AUTOCOMMIT ---------------------------------------------------------------------- Vincent Snijders · 2009-04-08 12:18 When I used the TSQLQuery with TSQLite3Connection I also did sqlFattMia.ApplyUpdates after I updated all records. ---------------------------------------------------------------------- satyro · 2009-04-08 12:39 Quote from: Vincent Snijders on April 08, 2009, 02:18:51 pmWhen I used the TSQLQuery with TSQLite3Connection I also did sqlFattMia.ApplyUpdates after I updated all records. I added sqlFattMia.ApplyUpdates but does not update the table i use zeoslib ---------------------------------------------------------------------- Vincent Snijders · 2009-04-08 12:52 Did you commit the transaction? ---------------------------------------------------------------------- satyro · 2009-04-08 13:54 I set TZConnection.autocommit to false and then I forced commit by script, and it worked, thanks