简体   繁体   中英

RODBC ERROR: state IM002, code 0, message unixODBC Driver Manager]Data source name not found, and no default driver specified

I want to use RODBC to get data from MSSQL and I have installed unixodbc and FreeTDS on my Macbook.
odic.ini, odbcinst.ini and freetds.conf file is as follow.

在此处输入图片说明

But, R error is

odbcConnect(dsn = "RichardDSN",uid = "****",pwd = "******") 1 -1

Warning messages: 1: In odbcDriverConnect("DSN=RichardDSN;UID=****;PWD=******") : [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data source name not found, and no default driver specified

2: In odbcDriverConnect("DSN=RichardDSN;UID=****;PWD=******") : ODBC connection failed

how should I solve ?

I re-install unixodbc and freetds. then it works. T_T I don't know why...but first you must use odbcconfig to confirm where is your odic.ini and odbcinst.ini then vi them.

after I re-install, I also fail again.because, the path error, 'freetds' I input 'freetsd'...so I correct it, then it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM