RODBC with MAC does not work. Using unixODBC and Rstudio

I followed this guide http://eriqande.imtqy.com/2014/12/19/setting-up-rodbc.html to get RODBC to work with MAC and I can connect to the database.

Marcos-MacBook-Pro:~ MarcoB$ isql -v ODBC_SQLSS_R **** ****** +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> 

Configuration files are installed in accordance with the manual.

 Marcos-MacBook-Pro:~ MarcoB$ cat /usr/local/etc/freetds.conf [ODBC_SQLSS_R] host = xxx.xxx.xxx.xxx port = 1433 client charset = UTF-8 Marcos-MacBook-Pro:~ MarcoB$ cat /usr/local/etc/odbc.ini [ODBC_SQLSS_R] Driver = /usr/local/lib/libtdsodbc.so Server = xxx.xxx.xxx.xxx POrt = 1433 

I install the RODBC package

 > install.packages("RODBC", type = "source") ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded * DONE (RODBC) 

And when I try to do this, it seems like it is not using my UnixODBC libraries.

  library("RODBC") odbcDataSources() named character(0) 

When I try to connect via ODBC

  odbcConnect("ODBC_SQLSS_R", uid="*****", pwd="******"); Warning messages: 1: In odbcDriverConnect("DSN=ODBC_SQLSS_R;UID=*****;PWD=*****") : [RODBC] ERROR: state IM002, code 1962223636, message [iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded 

The error message tells me that RODBC is still using iODBC. I’ve been browsing the Internet for several days, but I can’t find a solution to the problem. It would be really amazing if anyone here could point me in the right direction.

Marco

+6
source share
1 answer

A clean reinstall of my Mac seems to have solved the library problems. I just followed the guide exactly, and it worked.

0
source

Source: https://habr.com/ru/post/989038/


All Articles