Data not commited lazarus / 16-Databases ---------------------------------------------------------------------- anis2505 · 2012-10-09 18:13 Hi there. SORRY FOR MY BAD ENGLISH I'm more & less new to lazarus. I'm a Java and Python developper. I'm using SQLdb component I'm using a form to insert and update data and another form with a  DataGrid to show the data. any way when I update the data I do close and open the SQLQuery related to the DataGrid but the modfied or added data does not show in the datagrid. please help ---------------------------------------------------------------------- goodname · 2012-10-09 18:52 Data is saved by triggering a Post event on the query. SQLQuery1.Post; In the SQLQuery1.AfterPost event put the following lines. The transaction is linked to the posted query. They should be in a try- exception block. SQLQuery1.ApplyUpdates; SQLTransaction1.Commit; If you want to reuse the dataset later then use SQLTransaction1.CommitRetaining; If your deleting records then use the SQLQuery1.AfterDelete event. You should be able to edit the data using the DBGrid instead of a separate form. Don't know your application so separate form may be best for your needs. Look through the wiki it has lots of good material to get you started. http://wiki.lazarus.freepascal.org/SQLdb_Tutorial1 ---------------------------------------------------------------------- jujibo · 2012-10-09 18:53 http://wiki.lazarus.freepascal.org/SQLdb_Tutorial2#Editing ---------------------------------------------------------------------- anis2505 · 2012-10-09 19:05 Here is a pic of the two forms. that may giv you ideas ---------------------------------------------------------------------- anis2505 · 2012-10-09 19:24 The problem thar I was using two different SqlQuery. I used the same it works fine. thanks