R/odbc.R

#' Manage Database Connection
#'
#' @description This RStudio Addin opens up the .odbc.ini file to manage local
#' SQL server login credential
#' @export
odbc_ini <- function() {
  if (!file.exists("~/.odbc.ini")) {
    file.create("~/.odbc.ini")
    # If you worry your users will get lost, you can provide an example here
    sink("~/.odbc.ini")
    cat("Some Example setup")
    sink()
  }
  file.edit("~/.odbc.ini")
}
hebrewseniorlife/addin_demo documentation built on May 7, 2019, 9:20 p.m.