狒
狒狒
Unregistered / Unconfirmed
GUEST, unregistred user!
使用ADO连接SQL数据库的pubs,NorthWind使用如下代码获得库中的表多于在企业管理器中看到的数目
begin
try
aTableList:=TStringList.Create;
self.ADOConnection1.GetTableNames(aTableList,false);
for iCount:=0 to aTableList.Count -1 do
begin
self.ListBox1.Items.Add(aTableList.Strings[iCount]);
end;
finally
aTableList.Free;
self.PageControl1.ActivePageIndex :=0;
end;
begin
try
aTableList:=TStringList.Create;
self.ADOConnection1.GetTableNames(aTableList,false);
for iCount:=0 to aTableList.Count -1 do
begin
self.ListBox1.Items.Add(aTableList.Strings[iCount]);
end;
finally
aTableList.Free;
self.PageControl1.ActivePageIndex :=0;
end;