rstudio dbi odbc connect Driver for SQL Server

453 views Asked by At

running the following code:

library(DBI)
conn <- DBI::dbConnect(odbc::odbc(),
                  driver = "ODBC Driver 17 for SQL Server",
                  database = "xyz",
                  server = "abc",
                  Trusted_Connection = "yes")

I get the following error message:

Error in UseMethod("odbcListObjects") : 
  no applicable method for 'odbcListObjects' applied to an object of class "Microsoft SQL Server"

any idea?

1

There are 1 answers

1
Simon Couch On BEST ANSWER

This issue has been addressed in the dev version of the package and will be fixed in the next release of odbc. In the meantime, you can install the dev version with devtools::install_github("r-dbi/odbc").