http://www.c-sharpcorner.com/FAQ/GetDBSchema.asp
我试过的 没问题

解决方案 »

  1.   


    select * from sysobjects where type ='u'
    应该可以实现,我在SQL查询器中经常使用的.
      

  2.   

    以下示例返回数据库中的表的列表。
    [Visual Basic] 
    Public Function GetTables(conn As OleDbConnection) As DataTable
      conn.Open()
      Dim schemaTable As DataTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, _
                                                              New Object() {Nothing, Nothing, Nothing, "TABLE"})
      conn.Close()
      Return schemaTable
    End Function
    [C#] 
    public DataTable GetTables(OleDbConnection conn)
    {
      conn.Open();
      DataTable schemaTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,
                                                       new object[] {null, null, null, "TABLE"});
      conn.Close();
      return schemaTable;
    }
      

  3.   

    select * from Northwind..sysobjects where type ='U'
      

  4.   

    select name from Northwind..sysobjects where type ='U'