rrjdbc

RJDBC: Error in class(obj) <- "rs.scalar" : cannot set attribute on a symbol


I am trying to run my R code, which worked perfectly fine two months ago but now crashes when I try to read some data of Teradata into R, in an sql-chunk. The error that shows up is the following:

Error in class(obj) <- "rs.scalar" : cannot set attribute on a symbol

I have no clue what is going on and why it does not work anymore. Anyone a clue?

Below my full R code:

```{r, include=FALSE}
library(RJDBC)
library(rstudioapi)

# Database Driver
drv <- JDBC(
  driverClass = getOption("teradata.driver"), 
  classPath = getOption("teradata.classpath")
)

# Database Connection
con <- dbConnect(
  drv, 
  url = getOption("teradata.dns"),
  user = getOption("teradata.user"),
  password = rstudioapi::askForPassword()
)
```

```{sql connection=con}
SELECT TOP 10 * FROM database.table
```

I am using R 3.5.0 and RJDBC packages is version 0.2-7.1.

Many thanks for your help!


Solution

  • Solved it. Seemed to be an error of RStudio itself (rs.scalar). Reinstalling RStudio solved the problem.