Last active
November 20, 2019 14:56
-
-
Save dainiuxt/23ce714e0deedc8da9a0 to your computer and use it in GitHub Desktop.
Connect MS Access database to R (RStudio) in Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("RODBC") #load package | |
db<-file.path("C:/path/to/your/database.accdb") #connect database. | |
#Note the UNIX style slash (/). "\" is "escape character" so all "\"you should replace either with "/" or "\\" | |
channel<-odbcConnectAccess2007(db) #internal RODBC function | |
dataSetName<-sqlFetch(channel,"TableName") #read particular table from Access database file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use this connectivity under Win x64 you should use 32 bit version of R, because RODBC isn't working with 64 bits.
Also I'm still unsuccessful to connect MS Access database in above mentioned way (in any way if to tell you the truth) in linux.