This is the program code for adding fields to the table, but it adds the field only after restarting the program.
Table1.Active:=False; Query2.Close; Query2.Sql.Clear; Query2.Sql.Add('alter table '+Edit4.Text+' add '+Edit2.Text+'char(20)'); Query2.execSQL; DBGrid1.Columns.Add; Table1.Active:=False; end;