Can just navigate with DBNavigator. Can't add, delete, edit ... lazarus / 16-Databases ---------------------------------------------------------------------- jeanchristophe · 2014-08-14 18:40 Hello This is strange for me, but if I can navigate with the DBNavigator, I can't use the others possibilities  Is it because I am using the join possibility in my Query? Code: [Select]procedure TForm1.FormCreate(Sender: TObject); begin  SQLite3Connection1.DatabaseName:= 'the path of the database';  If SQLite3Connection1.Connected= false then SQLite3Connection1.Connected:= true;  SQLTransaction1.DataBase:= SQLite3Connection1;  If SQLTransaction1.Active= false then SQLTransaction1.Active:=True;  SQLQuery1.DataBase:= SQLite3Connection1;  SQLQuery1.Transaction:= SQLTransaction1;  SQLQuery1.PacketRecords:= -1;  SQLQuery1.SQL.Add  ('select objekt.ObjektNogle, objekt.AFANogle, objekt.YVERTNogle, objekt.BilledetNogle from objekt inner join afatablefrim on objekt.AFANogle = afatablefrim.Nogle where afatablefrim.Land = "Frankrig" ');  If SQLQuery1.Active = false then SQLQuery1.Active:= true;  DataSource1.DataSet:= SQLQuery1;  DBGrid1.DataSource:= DataSource1;  DBGrid1.Columns [0].Width:= 150;  DBGrid1.Columns [1].Width:= 200;  DBGrid1.Columns [2].Width:= 200;  DBGrid1.Columns [3].Width:= 200;  DBEdit1.DataSource:= DataSource1;  DBEdit1.DataField:= 'AFANogle';  DBEdit2.DataSource:= DataSource1;  DBEdit2.DataField:= 'YVERTNogle';  DBEdit3.DataSource:= DataSource1;  DBEdit3.DataField:= 'ObjektNogle';  DBEdit4.DataSource:= DataSource1;  DBEdit4.DataField:= 'BilledetNogle';  DBNavigator1.DataSource:= DataSource1;  end;                                The DBNavigator is grey out for +, garbage, edit, post, cancel and refresh Best Regards Jean-Christophe ---------------------------------------------------------------------- rvk · 2014-08-14 20:39 Quote from: jeanchristophe on August 14, 2014, 08:40:15 pmIs it because I am using the join possibility in my Query? Yes, when using simple select statements the SQLQuery1 can automatically create Insert, Update and Delete statements. But when using more complex SQL-statements it can't. You'll need to provide the Insert, Update and Delete statements yourself in the InsertSQL, UpdateSQL and DeleteSQL-properties of your SQLQuery1. You can read about it on the wiki: Working With TSQLQuery Relevant part: TSQLQuery.InsertSQL, TSQLQuery.UpdateSQL and TSQLQuery.DeleteSQL: Basic Use of Parameters QuoteIn order to speed development, SQLQuery can try and deduce the required SQL statements. If the SQL property exists and the ParseSQL property is true (which it is by default), SQLQuery will try to generate these statements by parsing the SQL property. SQLDB stores these statements in the InsertSQL, UpdateSQL and DeleteSQL properties. However, sometimes the generated statements will not work (e.g. when inserting in tables with auto-increment/autonumber primary keys) or will be very slow. If needed, you can manually assign the statements. ---------------------------------------------------------------------- jeanchristophe · 2014-08-15 05:15 Thank you for your answer rvk  I take a look and come back! Best Regards Jean-Christophe