Zeos - table name with JOIN lazarus / 16-Databases ---------------------------------------------------------------------- tomek · 2012-04-27 19:57 I've sql query with JOIN tables, with SELECT table1.field table2.field ZReadOnlyQuery1.Fields.DisplayName give me only field name. How to get the name of the table to which each filed belongs ? ---------------------------------------------------------------------- JD · 2012-04-27 21:10 Try ZReadOnlyQuery1.Connection.Name JD ---------------------------------------------------------------------- tomek · 2012-04-27 21:21 Quote from: JD on April 27, 2012, 11:10:59 pmTry ZReadOnlyQuery1.Connection.Name JD Formating broke my post , should be Code: [Select]ZReadOnlyQuery1.Fields[i].DisplayNameBy ZReadOnlyQuery1.Connection.Name  I get "ZConnection1" but I want to get name of the table. ---------------------------------------------------------------------- JD · 2012-04-27 22:16 AFAIK, this is only possible if you are using ZTable. ZReadOnlyQuery and ZQuery by design do not allow this since they execute SQL statements that contain the name of the table(s) on which the query is performed.