Issues with MS Access database support.

Issue #1017 resolved
Former user created an issue

In testing the use of SQLAlchemy as a way of supporting MS Access and PostgreSQL, I found a few problems in access.py.

  1. Database reflection failed on my table due to Currency type not being recognised.
  2. Building SQL statements with functions (eg, func.sum(field_name)) failed due to a missing return statement.
  3. SQL statements with a JOIN in them were not able to be run, since Access 97 does not support bare 'JOIN' clauses. It only supports INNER JOIN, LEFT (OUTER) JOIN, RIGHT (OUTER) JOIN.

I attach a patch file that addresses all three issues, a test program and database.

The first two fixes are single line fixes and I don't think are controversial.

For the third problem I copied visit_join from compiler.py into access.py and added the INNER keyword. I have no idea if this is the 'right' way to fix this problem or not. My other thought would be to have a flag in access.py that visit_join in compiler.py checks and uses to return the INNER keyword when appropriate.

Cheers,

Rasjid.

Comments (7)

  1. Michael Trier
    • assigned issue to

    I do and it's on my radar. I'll give it some attention tonight or tomorrow.

  2. Log in to comment