Been running this script for 6+ years now and suddenly it no longer works. Cannot get any help from my IT department, so hoping someone here might have some insights. The issue seems to be around ODBC drivers in RStudio, as I am able to connect to this specific database using tools other than RStudio. Also, I am able to establish connections to other databases within RStudio other than the one that is causing me issues.
Here is the code that was running fine until a week ago:
Does this work on the R GUI but not on RStudio? Because it doesn't seem to be related to RStudio since you are connecting programmatically, maybe your problem is with the odbc R package?
Open the R GUI, (the one with the R icon) and run your code there, RStudio is an IDE for the R programming language but it is not an R interpreter, the code gets run on R under the hood but with some environment variables loaded.
Then your problem is not with RStudio but most likely with the odbc library. Have you recently upgraded your R version? If so, Have you recompiled your old packages for the new version?