#' Connexion SQL
#'
#' Permet d'établir la connexion au serveur SQL.
#'
#' @param statement Source de données machine.
#' @param user Identification de l'usager.
#' @param pwd Mot de passe de l'usager.
#' @param database Database sur le serveur. Peut être `NULL`.
#'
#' @keywords internal
#' @importFrom odbc odbc
#' @importFrom DBI dbConnect
#' @export
.connexion <- function(statement, user, pwd, database){
if(is.null(database)){
return(dbConnect(odbc(), statement, uid = user, pwd = pwd))
} else {
return(dbConnect(odbc(), statement, uid = user, pwd = pwd, database = database))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.