1

I'm trying to retrieve a list of tables from an MS Access mdb database file from Python using JayDeBeApi combined with UCanAccess. Querying the database works fine, though I cannot find out how top list all tables. I've been googling and trying for days now, but was not able to find a solution.

Anyone can help?

Thanks, best, Max

2
  • Please provide enough code so others can better understand or reproduce the problem. Commented Mar 17, 2022 at 13:13
  • Does this answer your question? Python odbc; how to find all tables in an odbc Commented Mar 17, 2022 at 17:26

1 Answer 1

2

Once you have created the connection using Import pyodbc: run this

for i in cursor.tables(tableType='Table'):
    print(i.table_name)
   

That should give you a list of all the tables in the MS access Db

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.