前提是数据库的种类未知,可以为任意数据库。数据库的连接方式为ADO。我现在在做一个用于数据迁移方面的软件,请各位大侠赐教!

解决方案 »

  1.   

    ListBox1:TListBox;Session.GetTableName('YourDatabaseName','',false,false,ListBox1.Item);
      

  2.   

    procedure TForm1.FormShow(Sender: TObject);
    begin
      Session.GetAliasNames(ComboBox1.Items);
    end;procedure TForm1.ComboBox1Change(Sender: TObject);
    var
      MyStringList: TStringList;
    begin
      try
        MyStringList := TStringList.Create;
        Session.GetTableNames(ComboBox1.Text,'*.*',False, False, MyStringList);
        ListBox1.Items := MyStringList;
      finally
        MyStringList.Free;
      end;
    end;