Geographic Information Systems Asked on March 22, 2021
Is it possible to open an Esri Personal Geodatabase (*.mdb; ArcGIS 10.2) in QGIS 2.6?
Previous versions were right.
If you have installed a 64-bit version of QGIS on Windows and you find that Personal GeoDatabases (*.mdb) no longer work for you, then this solution might apply; I'm on QGIS 2.8.1 rather than 2.6, but I assume that the issue and thus the solution is the same.
The underlying issue relates to this GDAL bug: Problem reading MDBs (64-bit)
Step 1
Download the 64-bit version of the ODBC driver: Microsoft Access Database Engine 2010 Redistributable
If you don't have a 32-bit version of office installed you can just run the executable. If however you do have a 32-bit office installation you will need to run the executable from a command prompt using the /passive
option
Step 2
Locate the qgis.bat file (mine is in C:OSGeo4W64binqgis.bat
for example).
Add the following two lines:
set OGR_SKIP=ODBC
set PGEO_DRIVER_TEMPLATE=DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%%s
Step 3
Open QGIS and drag the mdb file onto your workspace
Voila!
Answered by nmtoken on March 22, 2021
The solution proposed works fine also on windows 10. Only a further suggestion for adding the two line to the qgis.bat file.
The two line are setting. So it is important to add the lines before the start of the command.
Probably it is undestood but if you are not careful, there is a risk of being mistaken.
Answered by Roberto Marzocchi on March 22, 2021
Provided you have successfully installed Microsoft Access Database Engine 64 bit, you can:
Method 1 (works with QGIS 2)
add the following two lines:
set OGR_SKIP=ODBC
set PGEO_DRIVER_TEMPLATE=DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%%s
in your qgis.bat / qgis-grass7.bat / qgis-ltr.bat / qgis-ltr-grass7.bat before the last line, that usually is something like
start "QGIS" /B "%OSGEO4W_ROOT%"binqqis...
[note that there are two percent signs in the value of PGEO_DRIVER_TEMPLATE variable]
Method 2 (works with QGIS 3)
In QGIS Settings panel -> Options | System | Environment add the following two variables:
variable name: OGR_SKIP
value: ODBC
variable name: PGEO_DRIVER_TEMPLATE
value: DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%s
and check the "Use custom variables" checkbox
[note that in this case there is only one percent sign in the value of PGEO_DRIVER_TEMPLATE variable]
Method 3 (works with both QGIS 2 and QGIS 3)
In the Environment Variables panel of the Windows Advanced System Settings, set the following two new variables as User Variables or System Variables:
variable name: OGR_SKIP
value: ODBC
variable name: PGEO_DRIVER_TEMPLATE
value: DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=%s
[note that also in this case there is only one percent sign in the value of PGEO_DRIVER_TEMPLATE variable]
Answered by Andrea Giudiceandrea on March 22, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP