View Full Version : System tables


SpookyDescendan
10-24-2006, 05:01 AM
Hello,

My application I develop should retrieve some meta data from Access system tables. It should find:
- What tables are stored in database.
- What columns have each table in database.
- What relationships are between tables in database.
I opened systems tables of some .mdb file and took interest in such kind of information. But I got some problems by looking for what exactly I need. Please, could someone help me at these points:

1) I found that in system table MSysObjects I can find names and ids of tables created by user (for example by me). But how to determine that these tables are created by user and they are not let’s say a system tables?
2) I didn’t find any meta data about columns of tables! How to determine what columns has each table?

I created application which uses MS SQL Server to retrieve such a kind of meta information and there where no problems. But I stuck using Access.
I was looking for some information in Internet but ineffectively. Please, help me...

Ron_dK
10-24-2006, 05:22 AM
I'm not sure if I get your point but believe that you're looking for an analysis of your DB objects.
If so, go to tools>analyze>documenter. Select all objects type, select all and hit OK.
The analysis will give you all info on tables, queries, etc and the relationships.

Hth

SpookyDescendan
10-24-2006, 06:01 AM
Hi Rak,

you are right I intend to analyze objects of my DB. And I'll try to ask again more detailed:
Every table has some columns. Could you tell me please which system table stores names and ids of columns? I meen I need to know where to look for such kind of information.

When I open an mdb file I find some system tables: MSysAccessObjects, MSysAccessXML, MSysACEs, MSysObjects, MSysQueries, MSysRelationships. But no one of them stores names and ids of columns.

Any suggestions...?

Thanks.

Ron_dK
10-24-2006, 06:35 AM
Maybe this might help :

http://www.databasejournal.com/features/msaccess/article.php/3528491

SpookyDescendan
10-25-2006, 01:07 AM
Hi Rak,

I already read this article but didn't find I look for.
Hey Access experts! I don't believe nobodies knows an answer to this question:

Where are stored a meta data about columns from all user tables in database?
I mean which system table stores information about columns of tables?


Maybe this might help :

http://www.databasejournal.com/features/msaccess/article.php/3528491

Pat Hartman
10-25-2006, 07:00 PM
Here's a link to code I posted that will help you.
http://www.access-programmers.co.uk/forums/showthread.php?t=113200&highlight=fields+collection
It is from a documentation database that I created. Earlier versions of Access had a table that contained column information but no longer. System tables are all prefixed by "MSys". Deleted tables are prefixed by "~". Both of those should be excluded from you tables query from MSysObjects.