| Sub ADOListTables() Dim cat As New ADOX.Catalog Dim tbl As ADOX.Table ' Open the catalog cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=.\NorthWind.mdb;" ' Loop through the tables in the database and print their name For Each tbl In cat.Tables If tbl.Type <> "VIEW" Then Debug.Print tbl.Name Next 'With DAO, the TableDef object represents a table in the database and the TableDefs collection contains a TableDef 'object for each table in the database. This is similar to ADO, in which the Table object represents a table and the Tables 'collection contains all the tables. 'However, unlike DAO, the ADO Tables collection may contain Table objects that aren't actual tables in your Microsoft Jet 'database. For example, row-returning, non-parameterized Microsoft Jet queries (considered Views in ADO) are also 'included in the Tables collection. To determine whether or not the Table object represents a table in the database, use 'the Type property. The following table lists the possible values for the Type property when using ADO with the Microsoft Jet Provider. 'Type Description 'ACCESS TABLE The Table is a Microsoft Access system table. 'LINK The Table is a linked table from a non-ODBC data source. 'PASS-THROUGH The Table is a linked table from an ODBC data source. 'SYSTEM TABLE The Table is a Microsoft Jet system table. 'TABLE The Table is a table. 'VIEW The Table is a row-returning, non-parameterized query. End Sub |
Tables, List |
India web developer web development India | Freelance web development ecommerce web developer | Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design