12

So I am new to the QGIS community, and I have been trying to bring in some rather large access databases with little to no success. I have windows 7, so I've gone in through administrative tools/Data Sources (ODBC) to create a new user DSN. I made it a Microsoft Access Driver (.mdb,.accdb), and linked it to the database I wish to use.

Then in QGIS, I have used add vector layer, selected Database, left type ODBC, given it a name, specified localhost and for Database, written in an identical name to the User DSN I created... BUT... every time I try to test it, it gives the following error:

Connection failed - Check settings and try again.

Extended error information:
Unable to initialize ODBC connection to DSN for ALC_AV_CO,
[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

Why is it doing this?

Interestingly enough the only time I had success, I managed to somehow create a User DSN which was a Microsoft Access Driver (*.mdb) without the .accdb (I saved a version of my DB in .mdb to make this work too). However, for reasons unknown to me, this option is no longer available to me in the create new data source menu, so I can't use it again!

I would really appreciate if someone could give me advice on what I am doing wrong!

3
  • +1 - I tried the same process you did, with the same result. Incidentally, this is the same process put forth by a commenter on @underdark's blog, so you would think it would work. It could be that something has changed in the ODBC driver. Here's a link to that thread: Table Join - A new feature in QGIS Commented Oct 19, 2012 at 17:56
  • Ya, I found similar instructions whilst surfing the interwebs. So far the best working solution I have come up with is to just make everything in the Access database I somehow got to connect (when I try to open it in the User DSN it claims it cant find the file... but it still works in QGIS). I was just curious if I was doing a process incorrectly, or if there was a bug.
    – user12104
    Commented Oct 19, 2012 at 20:20
  • You might really consider filing a bug report at the [QGIS](www.qgis.org) website. This is the sort of thing that should be looked into more closely. Commented Oct 23, 2012 at 8:21

3 Answers 3

2

if you use win7 64 bit:

Probably, you configure the wrong databaseinterface.

Use this file: %systemdrive%\Windows\SysWoW64\Odbcad32.exe to configure it.

Its not the same as you reach by mouseklicks.

if you use mysql-db with odbc: you have to install the right driver

Maybe it helps to read / gtranslate this website

greets

kreike

2

I have found that in addition to kreike's answer about installing the 32-bit driver in the proper place, I also needed to be using the 32-bit version of QGIS. The 64-bit QGIS doesn't seem to 'talk' to the 32-bit driver correctly (or it may not realize it's been placed in the SysWoWfolder).

1

in the passed have experienced errors derived from the 64bit /32bit ODBC drivers (as explained in the answer above), between postgis/access/qgis. I decided to downgrade all 3 to 32bits and now can connect to both .mdb and .accdb via ODBC with no problem (well, it takes a while), and afterwards join these tables to layers (shp and postgis).

And I love how qgis 2.0 connectos to access and postgis, it's a fantastic tool for me.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.