Domanda

How to get the table structure in MS Access with a SQL query?

Using the following query:

SELECT name FROM MSysObjects

Results in the following exception:

Exception: [Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no read permission on 'MSysObjects'.

È stato utile?

Soluzione 2

Use This

SELECT * FROM MSysObjects WHERE Type=1 AND Flags=0

Ms Access has several system tables that are, by default, hidden from tables list. You can show them.

In Ms Access 2007 do a right click on tables list and select Navigation Options. At the bottom of the form you will find Show System Objects check box. Check it and system tables will show up in tables list. They all start with MSys. Alternatively, options form can be activated from application menu - click button Access options -> select Current Database and there is Navigation Options button.

Now you can examine structure and contents and generate queries of all system tables with MsAccess tools.

Source

Altri suggerimenti

To resolve the permissions issue for MSysObjects, see these similar questions: no read permission on 'MSysObjects', or Run C# queries against (hidden) system tables in Access?

Set up an ODBC connection for your postrgres database and then call the transfer database command for each of your tables.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top