r-dbi / odbc

Connect to ODBC databases (using the DBI interface)
https://odbc.r-dbi.org/
Other
387 stars 107 forks source link

`set_odbcsysini()` doesn't do anything #791

Closed simonpcouch closed 4 months ago

simonpcouch commented 4 months ago

In the code:

https://github.com/r-dbi/odbc/blob/8c7a0e2d2d1236bd4172dfbc3081b129737e89b4/R/utils.R#L140-L146

odbcListConfig()$drivers will always return:

#> Error in odbcListConfig()$drivers : 
#>  $ operator is invalid for atomic vectors

Since it's try-caught, the error is never returned, and set_odbcsysini() has no effect. Transitioning to odbcListConfig()["drivers"] resolves that issue, at which point we might actually see resolution of #709 and friends.

(Uncovered by @gaborcsardi!)