equivalent of "show tables;" in access?

L

leelee

Hi,

I am writing a perl script to retrieve some information from an access
database. But i do not know the schema of the db. When i open it using ms
access, the options are all greyed out, so i cant do anything there. This db
is maintained by the software of a machine, so i think thats why there is no
options available for me. I tried using "select name from sysobjects where
type = 'U'" but that doesnt work. "show tables;" brings up an error about how
the querries are suppose to start with "select, insert,", etc. I am
connecting to the db using DBD::ODBC. How can i learn more about the db so i
can do what it is that i have to do with my perl script?

Thanks.
 
J

John Vinson

Hi,

I am writing a perl script to retrieve some information from an access
database. But i do not know the schema of the db. When i open it using ms
access, the options are all greyed out, so i cant do anything there. This db
is maintained by the software of a machine, so i think thats why there is no
options available for me. I tried using "select name from sysobjects where
type = 'U'" but that doesnt work. "show tables;" brings up an error about how
the querries are suppose to start with "select, insert,", etc. I am
connecting to the db using DBD::ODBC. How can i learn more about the db so i
can do what it is that i have to do with my perl script?

Thanks.

Access somewhat violates expectations in this regard: the table
structures are stored in a cryptic, undocumented form in normally
hidden Systems tables (MSysObjects to be precise). The familiar SQL or
ORACLE schema tables simply don't exist in a JET database.

You can either use the MSysObjects table as Graham suggests, or use
the DAO or ADO Tabledefs objects in code.

John W. Vinson[MVP]
 

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