可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I've been trying to connect my company's DMS to R using the odbcConnect
command, but get the following message:
myConn
The thing is, I'm positive the Data source name is NZSQL and my uid and password are correct as well. Any insight as to why R may not be finding my data source / driver (the driver is, by the way, specified and working).
Thanks!
回答1:
I ran across this same problem when I was first trying to connect to an Oracle database. In the end what worked for me was using odbcDriverConnect and a connection string instead of odbcConnect.
myConn
You can check on https://www.connectionstrings.com/ for your specific connection string for your database. Mine happened to be this one.
Hope this helps.
回答2:
I was trying to access SQL Server database and got the same error. After using the correct format of db connection, I got access to my sql server database.
dbhandle
回答3:
What worked for me was a 32 bit connection instead of a 64 bit connection.
回答4:
I know this is old but also make sure that you remove the spaces around the '=' sign. That was my problem.
回答5:
This is IM02 error which means name of the DSN is incorrect.
GO to ODBC and check the USER/System DSN that you should be using. Once your name of DSN is correct, you might get IM014 state error which is archtecture mismatch. In that case,
The simpler solution is IN r studio - go to tools and change the version of R to 32 bit.
It should be ready to work