Create a connection to a SQL Server database
Source:R/create_sqlserver_connection.R
create_sqlserver_connection.Rd
Establishes a connection to a SQL Server database
using the ODBC driver. This function uses Windows authentication only. Use
DBI::dbDisconnect()
to disconnect this connection once no longer in use.
Examples
if (FALSE) { # \dontrun{
# Connect to a SQL Server database
con <- create_sqlserver_connection(
server = "my_server",
database = "my_database"
)
# Remember to disconnect after usage
DBI::dbDisconnect(con)
} # }