DBGrid isn't working properly lazarus / 16-Databases ---------------------------------------------------------------------- nikel · 2017-01-18 12:59 Hi, I'm trying to display and edit data on datagrid, this works fine: SELECT * FROM TBL_EXECUTABLE; But when I set this for sql text: Code: SQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SELECT TBL_EXECUTABLE.ID, TBL_EXECUTABLE.CB_CHECKED, TBL_EXECUTABLE.TXT_ALIAS, TBL_EXECUTABLE.TXT_PATH, TBL_SWITCHES.ID, TBL_SWITCHES.TXT_PRE_SWITCH, TBL_SWITCHES.TXT_POST_SWITCH AS POST FROM TBL_EXECUTABLE LEFT JOIN TBL_SWITCHES ON TBL_EXECUTABLE.ID_SWITCH = TBL_SWITCHES.ID; I can't edit the dbgrid. Sorry for my English. ---------------------------------------------------------------------- tk · 2017-01-18 13:03 Don't work much with databases but I am pretty sure joins are read only. ---------------------------------------------------------------------- goodname · 2017-01-18 14:19 It is the TSQLQuery that has become read only. For simple queries the insert, update, and delete queries can be figured out by TSQLQuery. For queries with joins these write queries cannot be guessed. Set the TSQLQuery.InsertSQL,  TSQLQuery.UpdateSQL, and TSQLQuery.DeleteSQL queries. ---------------------------------------------------------------------- nikel · 2017-01-18 18:30 Your suggestion worked fine after searching a lot. Finally I'm using something like this "SQLQuery1.InsertSQL.Text:=..." Thanks a lot.