[SOLVED] How to refresh a record in a Grid? lazarus / 16-Databases ---------------------------------------------------------------------- socger · 2014-12-04 08:59 In a SELECT to MySQl i use 3 tables with LEFT JOIN in two of them. When on the component SQLQuery make a APPEND or INSERT (even in an EDIT) and then do the ApplyUpdate, the fields that they are not of primary tables ( LEFT JOIN), won't be refresh. I've solved returning to do the SELECT and going on the record with a LOCATE. But this means bringing back all the records in the SELECT. So the question is, is there another way to just refresh the record that I just created or modified?. Forgive my translation with Google. Greetings and thank you very much. ---------------------------------------------------------------------- exdatis · 2014-12-04 09:08 Something like... Save position eg. const   yourIdKey : String = 'yourFieldName'; var   currPosition : Integer; begin   currPosition:= yourDataSet.FieldByName(yourIdKey).AsInteger;   yourDataSet.DisableControls;   try     yourDataSet.Refresh.     yourDataSet.Locate(yourIdKey, currPosition, []);  finally     yourDataSet.EnableControls;  end; ---------------------------------------------------------------------- socger · 2014-12-04 09:29 Yes i did something like it. But i want only to refresh the record that was insert or edit, but without loose the rest of records. Thank you, for your help my teacher. ---------------------------------------------------------------------- fpcoder · 2014-12-05 04:23 I dont think you can refresh just one record. But does it matter? Take a look at the query's property PacketRecords. Its 10 by default and thats how many records that will be retrieved from the table at once. So maybe you can just go with that. Quote from: socger on December 04, 2014, 10:29:43 amYes i did something like it. But i want only to refresh the record that was insert or edit, but without loose the rest of records. Thank you, for your help my teacher. ---------------------------------------------------------------------- socger · 2014-12-05 11:37 OK, THANK YOU