I have feature classes in a personal geodatabase on a Win 8.1 machine (r 3.4.2, rgdal 1.2-15) and, as mentioned here, there is a requirement for Access users to also interact with them.
I have adjusted the code sample found here (which works perfectly for a file geodatabase):
require(rgdal) # The input personal geodatabase pgdb <- "C:/path/to/your/personalgeodatabase.mdb" # Confirm the PGeo driver is available subset(ogrDrivers(), grepl("PGeo", name))
name long_name write copy isVector 49 PGeo ESRI Personal GeoDatabase FALSE FALSE TRUE
Then, at this point, ogrListLayers(dsn) fails:
# List all feature classes in a personal geodatabase fc_list <- ogrListLayers(pgdb)
Error in ogrListLayers(pgdb) : Cannot open data source
I have tried adding path.expand:
fc_list <- ogrListLayers(path.expand(pgdb))
And I have also confirmed that for gdal (and so rgdal), that
Personal Geodatabases are accessed by passing the file name of the .mdb file to be accessed as the data source name. On Windows, no ODBC DSN is required.
I successfully accessed the feature classes using R-ArcGIS but that requires an ArcGIS licence, and so does not really solve the problem.