Skip to content

Instantly share code, notes, and snippets.

@daattali
Last active Oct 19, 2017
Embed
What would you like to do?
connecting to SQL Server external vs local
# production
dbConnect(
RSQLServer::SQLServer(),
server = config$server,
database = config$database,
properties = list(
user = config$uid,
password = config$pwd
)
)
# local
# 'server' changes to 'Server'
# 'database' changes to 'Database'
# properties isn't required
# Driver is required
# drv is different
dbConnect(
odbc::odbc(),
Driver = "{SQL Server}",
Server = config$server,
Database = config$database
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment