I am trying to connect and MS Access database to R and create a dataframe and eventually plot some data, but I get this error, while it seems I am importing the data from a table correctly. Where is the problem?
Console:
> # Load RODBC package
> library(RODBC)
>
> # Connect to Access db
> db_address <- "S:/LKF/Interdepartmental/DataGovernance/Tools/MM_Backend.accdb"
> db <- odbcConnectAccess(db_address)
Error in odbcConnectAccess(db_address) :
odbcConnectAccess is only usable with 32-bit Windows
>
>
> # Get data
> sql <- "select * from tblMaterials"
> df1 <- sqlQuery( db , sql)
Error in sqlQuery(db, sql) : first argument is not an open RODBC channel
Code:
# Load RODBC package
library (RODBC)
# Connect to Access db
db_address <- "S:/LKF/Interdepartmental/DataGovernance/Tools/MM_Backend.accdb"
db <- odbcConnectAccess(db_address)
# Get data
sql <- "select * from tblMaterials"
df1 <- sqlQuery( db , sql)