Firebird: StringGrid header vs Field name lazarus / 16-Databases ---------------------------------------------------------------------- asdf · 2010-11-17 17:26 sq.SQL.Clear;  sq.SQL.Text:= 'select first 100 * from fdb1';  sq.Open;  i:=0;  StringGrid1.ColCount:=sq.FieldCount;  for i:=0 to sq.FieldCount-1 do  begin  StringGrid1.Cells[0, i] := sq.Field(i).FieldName;  end;  stringgrid1.AutoSizeColumns;  How can I write the above line to show each fieldname in each column header?  And like such line for the data in the grid as well? ---------------------------------------------------------------------- jhvhs · 2010-11-17 18:06 Hi. I usually work with SQLite and Mysql,  but I think it should be the same for Firebird: Code: [Select]StringGrid1.Cells[0, i] := sq.Fields[i].FieldName; Assuming that sq is a descendant of a TDataset of some sorts.