I am trying to open an access database in R using RODBC but I've been unable to do so.
Based on this post, I've converted the R version being used in Rstudio to 32 bit instead of 64 bit.
I have also tried using the language in this post:
odbcDriverConnect('DRIVER={Microsoft Access Driver (*.mdb)};DBQ=<fileSpec>')
I have also looked over possible reasons in this post as to why the connection is not being established.
The files are not locked and I have changed my R version to a 32 bit to match the ODBC drivers 32 bit. I am also able to establish odbc connection to the access driver using STATA, so I don't think I have any permission problems.
When listing the available data sources, I get the following showing the driver I'm trying to access:
> odbcDataSources()
Excel Files
"Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)"
MS Access Database
"Microsoft Access Driver (*.mdb, *.accdb)"
When trying to just connect to the Access Data Source, I get the following error:
ch <- odbcConnect("MS Access Database")
Warning messages:
1: In RODBC::odbcDriverConnect("DSN=MS Access Database") :
[RODBC] ERROR: Could not SQLDriverConnect
2: In RODBC::odbcDriverConnect("DSN=MS Access Database") :
ODBC connection failed