Problem reading MDBs (64-bit)
|Reported by:||jmitchell||Owned by:||warmerdam|
I have been trying to get both ordinary Access Database MDBs and also Personal Geodatabase MDBs to load in 64-bit QGIS 2.4 on Windows (installed via the 64-bit OSGeo4W installer). I have also tried with no success to read MDBs from the command line using ogrinfo.
I think that the problem is that GDAL/OGR expects the MS Access ODBC Driver to be named "Microsoft Access Driver (*.mdb)" This is ok when running 32-bit versions because Windows includes a default 32-bit driver with this name out of the box.
However there is no equivalent 64-bit driver included with Windows. To get a 64-bit Access ODBC Driver you have to install a 64-bit version of Access or Access Runtime and all versions of the 64-bit driver are named "Microsoft Access Driver (*.mdb, *.accdb)"
The only way I have been able to get MDBs to load in 64-bit QGIS is by renaming the Registry Key
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Access Driver (*.mdb, *.accdb)
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Access Driver (*.mdb) using regedit.
While this hack enables MDBs to load in QGIS (by drag and drop) I don't know whether renaming this registry key may cause other unforeseen issues and also it still doesn’t enable MDBs to be read correctly with ogrinfo on the command line.
I have also tried setting the PGEO_DRIVER_TEMPLATE Config Option to "DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%s" but for some reason this setting seems to be ignored when using the OSGeo4W 64-bit install.