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!

Retrieve Access table names with ADO

Status
Not open for further replies.

D2

Technical User
Feb 6, 2001
1
US
Hi all!

I am trying to use ADO to connect to an “unknown” MS Access database and then to allow the user to select the desired table in this database.

I want the user to be able to select at execution time the MS Access database of their choice and then open the table of their choice.

I am able to load an MS Access database successfully. However, I am stumped on how to obtain the available tables in the database.

Any help would be greatly appreciated.

Thanks!
 
Look up 'tabledefs' in Ms. Access help. If you instantiate the tabledefs collection, you can itterate through the collection, retrieving the table names.

I would be extremely careful in presenting a list of databases and tablenames to 'Users' for arbitrary selection. It would appear to be hazardous. Without being able to be assured that the databases/tables/fields were strictly structured to be used within the app, I would expect only major disasters in the mis-application of the application.



MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top