var i:integer; list:TStrings;begin if not ADOConnection1.Connected then ADOConnection1.Connected := True; list := TStringlist.Create; //ADOConnection1.GetTableNames(list); try ADOConnection1.GetTableNames(list); ListBox1.Items := list; finally Freeandnil(list); end;
Form1.qry1.SQL.Clear; Form1.qry1.Close; Form1.qry1.SQL.Add('select name from MSysObjects where type=1 and flags=0 '); Form1.qry1.Open; Form1.qry1.First; while not form1.qry1.Eof do begin name := Form1.qry1.FieldByName('name').AsString;end;我已经做好了,谢谢大家的帮助噢。