Delphi-Quellcode:
procedure TfrmMain.Button1Click(Sender: TObject);
var
st: TStringList;
i: integer;
begin
st:=TStringList.Create;
ADOConnection1.GetTableNames(st,False);
TreeView1.Items.Clear;
for i:=0 to st.Count - 1 do begin
TreeView1.Items.Add(nil,st.Strings[i]);
TreeView1.selected;
ADOQuery1.Close;
while ADOQuery1.Active do
ADOQuery1.Close;
ADOQuery1.SQL.Text := 'select * from '+TreeView1.selected.text;
ADOQuery1.Open;
While Not ADOQuery1.Eof do begin
TreeView1.Items.AddChild(TreeView1.Selected,ADOQuery1.FieldValues['Feld1']);
ADOQuery1.Next;
end;
end;
st.Free;
end;
erzeugt keine untereinträge