Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

simple database question

hi guys,

I have an ADO application with an MsAccess and I want to add the table fields name to a listbox... Any ideas?

best regards
Manuel Lopez (lopem)
0
lopem
Asked:
lopem
1 Solution
 
mikelittlewoodCommented:
procedure TForm1.Button1Click(Sender: TObject);
var
  slTemp: TStringList;
begin
  slTemp := TStringList.Create;
  try
    ADOQuery1.Open;
    ADOQuery1.GetFieldNames( slTemp);

    ListBox1.Items.Assign( slTemp);
  finally
    FreeAndNil( slTemp)
  end;
end;
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now