你看一下我的程序可能有帮助的。
procedure Tfrm_sqlexplore.TV1Click(Sender: TObject);
var
list:Tstringlist;
node2:Ttreenode;
i:integer;
listitem:Tlistitem;
begin
if tv1.Selected <> nil then
begin
if tv1.Selected.Level=1 then
begin
lv1.Items.BeginUpdate;
lv1.Items.Clear;
list:=Tstringlist.create();
session.GetAliasParams(tv1.selected.Text,list);
for i:=0 to list.Count-1 do
begin
listitem:=lv1.Items.Add();
listitem.Caption:=copy(list,1,pos('=',list)-1);
listitem.SubItems.add(copy(list,pos('=',list)+1,length(list)));
end;
lv1.items.endupdate;
end;