We currently try to get table metadata by querying the MSysObjects system table, but that will often fail because the default user (admin) does not have read permissions. The workaround is to open the database in Access, go into the VBA IDE, and run a GRANT statement in the Immediate window as described here, but that's rather fussy and would have to be done for every affected database file.
As discussed on Bitbucket, a better approach would be to use the tables and columns methods of the pyodbc Cursor object, which use standard ODBC calls to retrieve that information.
We currently try to get table metadata by querying the
MSysObjects
system table, but that will often fail because the default user (admin
) does not have read permissions. The workaround is to open the database in Access, go into the VBA IDE, and run aGRANT
statement in the Immediate window as described here, but that's rather fussy and would have to be done for every affected database file.As discussed on Bitbucket, a better approach would be to use the tables and columns methods of the pyodbc
Cursor
object, which use standard ODBC calls to retrieve that information.