Reputation: 763
I have tried every alternative but I have no other options for doing what I want (bulk insert in r using dbBulkCopy), I am getting this error:
install.packages(pkg='C:/folder/rClr_0.7-2.zip') inferring 'repos = NULL'
from 'pkgs' package 'rClr' successfully unpacked and MD5 sums checked
library(rClr) Error : .onLoad failed in loadNamespace() for 'rClr', details: call: fun(libname, pkgname) error: 'msvcr120.dll' was not found on this Windows system. You are probably missing the Visual C++ Redistributable for Visual Studio 2013. Check instructions at https://r2clr.codeplex.com/wikipage?title=Installing%20R%20packages&referringTitle=Documentation In addition: Warning message: package 'rClr' was built under R version 3.1.2 Error: package or namespace load failed for 'rClr'
Upvotes: 0
Views: 388
Reputation: 763
After few hours of research I got what the issue was, and here I want to share how I resolved it.
install requited packages 1- install Rtools on your system 2- then devtools 3- then rsqlserver 4- then rClr
install.packages("devtools.zip", repos = NULL, type = "source")
install_github("jmp75/rClr", build_vignettes=TRUE)
install_github('agstudy/rsqlserver')
library(devtools)
library(rClr)
library(rsqlserver)
dat22 <- data.frame(TFN = c('300', '300', '300', '300'), ID = c(1:4), HOUR = c(1, 1, 2,5))
urlLocal = "Data Source=111.00.10.10; Initial Catalog=bo; Integrated Security=False;Persist Security Info=True; User Id=yourname;Password=yourpass;MultipleActiveResultSets=true"
conLocal <- dbConnect('SqlServer', url = urlLocal)
Upvotes: 0
Reputation: 2722
The problem is that you don't have 'msvcr120.dll' available. You can confirm this by verifying the following is true:
Sys.which('msvcr120.dll') == ''
As to why it isn't available, you should start by comparing the path that you believe it is installed in to what is returned by Sys.getenv()
Upvotes: 0