How can I view the metadata for a Microsoft Access 2013 table?

yesman picture yesman · Jul 6, 2014 · Viewed 9.9k times · Source

How can I view the metadata(data dictionary) for a Microsoft Access 2013 table?

Answer

Hadi picture Hadi · Jun 4, 2017

If you want to retrieve the access database metadata this may be helpful:

Every microsoft access database contains a system table named MSysObjects. This tables contains this database metadata. You can get all objects with there creation date and last update date.

You can list all Objects in an Access Database using the following query:

SELECT Name, DateCreate, DateUpdate,   
 iif(LEFT(Name, 4) = 'MSys','System Table', 
 iif(type = 2,'System Object',  
 iif(type = 3,'System Object', 
 iif(type = 8,'System Object',  
 iif(type = 4,'Linked Table (ODBC)', 
 iif(type = 1,'Table',  
 iif(type = 6, 'Linked Table (MsAccess/MsExcel)', 
 iif(type = 5,'Query',  
 iif(type = -32768,'Form', 
 iif(type = -32764,'Report',  
 iif(type=-32766,'Macro', 
 iif(type = -32761,'Module',  
 iif(type = -32756,'Page',  
 iif(type = -32758,'User','Unknown')))))))))))))) as ObjectType 
  FROM MSysObjects WHERE LEFT(Name, 1) <> '~' 

If you don't want to show system objects you can add these conditions to the where clause:

AND LEFT(Name, 4) <> 'MSys' AND Type IN (1, 5, 4, 6,  -32768, -32764, -32766, -32761,-32756,-32758)

enter image description here

Also i created an application that retrieve data from access database, Which i created a new Git-repository for it