Hi,
I am trying to connect to an SQL server to download data as RDS files, previously this script was working however my computer was reformated and the versions of R / Rstuido have changed.
packages ====
library(pacman)
pacman::p_load(odbc,data.table)
connStr <- paste0("SELECT * FROM DATABASE;")
conn <- dbConnect(odbc::odbc(),.connection_string = "driver={SQL Server};server=SQLSERVER;trusted_connection=yes;database=DATABASE;")
The Error I receive:
Error in dbConnect(odbc::odbc(), .connection_string = "driver={SQL Server};server=SQLSERVER;trusted_connection=yes;database=DATABASE;") :
could not find function "dbConnect"
For privacy, I have changed the naming convention of the database string, the script runs on my coworker's computer but not mine, and as the script has run historically I believe the issue is with my computer.
I have tried running the script on different versions of R (3.5, 4.1, 4.1.1, 4.2 and 4.3) but with no success.
Any help would be much appreciated