Tables Collection (ADOX)

Contains all Table objects of a catalog.

Remarks

The Append method for a Tables collection is unique for ADOX. You can:

  • Add a new table to the collection with the Append method.

The remaining properties and methods are standard to ADO collections. You can:

  • Access a table in the collection with the Item property.

  • Return the number of tables contained in the collection with the Count property.

  • Remove a table from the collection with the Delete method.

  • Update the objects in the collection to reflect the current database schema with the Refresh method.

Some providers may return other schema objects, such as a view, in the Tables collection. Therefore, some ADOX collections may contain multiple references to the same object. Should you delete the object from one collection, the change will not be visible in another collection that references the deleted object until the Refresh method is called on the collection. For example, with the OLE DB Provider for Microsoft Jet, views are returned with the Tables collection. If you drop a view, you must refresh the Tables collection before the collection will reflect the change.

This section contains the following topic.

See Also

Catalog ActiveConnection Property Example (VB)
Columns and Tables Append Methods, Name Property Example (VB)
Connection Close Method, Table Type Property Example (VB)
Keys Append Method, Key Type, RelatedColumn, RelatedTable and UpdateRule Properties Example (VB)
Catalog Object (ADOX)
Table Object (ADOX)