How to see tables in an Access database

  • Thread starter Thread starter Drago
  • Start date Start date
D

Drago

Does anyone know how to enumerate the tables contained in an Access
database?

Thanks
 
Hi!

You can use the command text:
"SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],1)<>'~') AND
(Left$([Name],4) <> 'MSys') AND (MSysObjects.Type)=1 ORDER BY
MSysObjects.Name;"

The only problem is that you need to have explicit 'Read Data' permissions
on the MSysObjects table, otherwise you get an exception.

Hope that helps!
 
Thanks!

Sheila Jones said:
Hi!

You can use the command text:
"SELECT MSysObjects.Name FROM MsysObjects WHERE (Left$([Name],1)<>'~') AND
(Left$([Name],4) <> 'MSys') AND (MSysObjects.Type)=1 ORDER BY
MSysObjects.Name;"

The only problem is that you need to have explicit 'Read Data' permissions
on the MSysObjects table, otherwise you get an exception.

Hope that helps!


Drago said:
Does anyone know how to enumerate the tables contained in an Access
database?

Thanks
 

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

Back
Top