Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO: collection of tables available?

Status
Not open for further replies.

bjgolden80

Programmer
Feb 6, 2003
15
US
With RDO you can expose the tables contained within the currently connected database through:

objConn.rdoTables

Is there a similar collection available under ADO ??

Thanks!

 
There is in the ADOX reference.

Code:
Dim cat as ADOX.Catalog
Dim tbl As ADOX.Table

set cat = New ADOX.Catalog
cat.ActiveConnection = objConn

For Each tbl In cat.Tables
    Debug.Print tbl.Name
Next



Or you can do a

set rs = objConn.OpenSchema(adSchemaTables)

The field TABLE_NAME will contain the names of each table in the database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top