Also in meiner Delphi-Hilfe (D6) ist zu GetTablenNames eine schönes Beispiel verlinkt:
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
SL: TStrings;
index: Integer;
begin
SL := TStringList.Create;
try
ADOConnection1.GetTableNames(SL, False);
for index := 0 to (SL.Count - 1) do begin
Table1.Insert;
Table1.FieldByName('Name').AsString := SL[index];
if ADOTable1.Active then ADOTable1.Close;
ADOTable1.TableName := SL[index];
ADOTable1.Open;
Table1.FieldByName('Records').AsInteger := ADOTable1.RecordCount;
Table1.Post;
end;
finally
SL.Free;
ADOTable1.Close;
end;
end;
Windows Vista - Eine neue Erfahrung in Fehlern.