最好有代码例子

解决方案 »

  1.   

    http://bbs.swjtu.edu.cn/bbscon?board=Visual&file=M.1081833471.A&num=5060
      

  2.   

    var
    slist:TStringlist;
    begin
       slist:=TStringlist.create;
       try
          with Database1 do
               begin
                   Connected:=false;
                   Databasename:=...............
                   GetTableName(slist,false);
               end;
               .................
       finally
           slist.free;
       end;
       end;
    end;
      

  3.   

    procedure GetTableNames(List: TStrings; SystemTables: Boolean = False);
    用这个函数就可以。
      

  4.   

    方法一:
    procedure TForm1.Button1Click(Sender: TObject);
    var
      TableLists : TStringList;
    begin
      TAbleLists := TStringList.Create;
      adoconnection1.GetTableNames(TableLists);
      ListBox1.Items.Assign(TableLists);
    end;方法二:
    select name from sysobjects where type = 'U' or type = 'S'
                                     ~~~~~~~~~~~      ~~~~~~~
                                      用户表           系统表