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)
LVL 3
lopemAsked:
Who is Participating?
 
mikelittlewoodConnect With a Mentor Commented:
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
All Courses

From novice to tech pro — start learning today.