Does anyone have a connection string example for using RODBC and connecting to MS SQL Server 2005 or 2008.
Thank you.
Try to use RSQLS package: https://github.com/martinkabe/RSQLS
Very fast pushes data from data.frame to SQL Server or pulls from SQL Server to data.frame.
Example:
library(devtools)
install_github("martinkabe/RSQLS")
library(RSQLS)
cs <- set_connString("LAPTOP-USER\\SQLEXPRESS", "Database_Name")
push_data(cs, dataFrame, "dbo.TableName", append = TRUE, showprogress = TRUE)
df <- pull_data(cs, "SELECT * FROM dbo.TableName", showprogress = TRUE)
This solution is much faster and more robust than RODBC::sqlSave or DBI::dbWriteTable.