Information Schema for MS Access

C

chris dubuc

All,

How does one query for a list of tables/columns in the
database?

For example, in SQL Server:

Select * from Information_Schema.Tables
or
Select * from Information_Schema.Columns Where
TABLE_NAME = 'Anytable'

will give you a list of the tables/columns in the database.

Oracle has something similar with USER_TABLES

What is the appropriate syntax (if any) for querying the
schema in MS Access?

My goal is to get a list of columns for a given table into
Excel via ODBC.

Thanks in Advance,

Chris
 
J

John Vinson

What is the appropriate syntax (if any) for querying the
schema in MS Access?

Alas, there is no such table. Access isn't properly relational in this
context!

You'll need to use VBA code to look at the Tabledefs collection, and
loop through the desired Tabledef's Fields collection. See the online
help in the VBA editor for Tabledef.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top