I want to export Tables from an Access database to .txt-files.
Here is my Code:
library(RDCOMClient)
#Path of txt File
destPath = 'C:\\Path\\to\\Hello.txt'
#Path of AccessDB
strDbName = "C:\\MyPath\\AccessDB.accdb"
#launche Access App
oApp = COMCreate("Access.Application")
#open the AccessDB
oApp$OpenCurrentDatabase(strDbName)
#Export the table to txt using transferText Method
acExportDelim <- 0
exportObj = oApp[["DoCmd"]]
exportObj$TransferText(acExportDelim,"NameOfTable", destPath, TRUE)
oApp$Quit()
exportObj <- NULL
oApp <- NULL
I cant find out why it doesnt work...
This is the error Message i get all the time:
<checkErrorInfo> 80020009
Error: exception occurred.
Any help appreciated! (The "RODBC approach" using 32bit R doesnt work for the entity i need)
Thanks in advance...