query display and column header lazarus / 16-Databases ---------------------------------------------------------------------- christensen · 2011-08-07 10:14 Lazarus 0.9.30, FPC 2.4.4 Windows 7 Ultimate 32-bit, Firebird 2.1.3, zeoslib 6.6.6, Kgrid (kcontrol 1.2). connection: Zconnection => Zquery => Tdatasource => Kgrid Code: [Select]              frmsetting.qryGrid.Close;             frmsetting.qryGrid.SQL.Clear;            frmsetting.qryGrid.SQL.Add('select tb_client.id_client, tb_client.name_client, tb_client.phone,tb_location.name_location, tb_client.address from tb_client join tb_location on tb_client.location_id=tb_location.id_location');             frmsetting.qryGrid.Open;             // column header             grdClient.Cols[0].Visible:=False;            grdClient.Cells[1,0]:='ID';            grdClient.Cells[2,0]:='Name';            grdClient.Cells[3,0]:='PhoneNo';            grdClient.Cells[4,0]:='Location';            grdClient.Cells[5,0]:='Address';      The problem is the query because if i don't join 2 table it work: Code: [Select]frmsetting.qryGrid.SQL.Add('select * from tb_client') but if i let the join query and i eliminate the header names it work as well ... now i dont know from where is the error...from the message i think it is from database/component i get this error(after the error the program is running, the query have been done but the column  header will not appear, only on the first column). ---------------------------------------------------------------------- christensen · 2011-08-07 12:28 i solved by adding name to the db fields Code: [Select]select name_client as "Client", phone as "Phone No.", address as "Address", name_location as "Location" from tb_client join tb_location on tb_client.location_id=tb_location.id_location'