Skip to content

RODBC error

2 messages · Dan Rowlands, Kasper Daniel Hansen

#
Hi,

I have been using RODBC to connect to a mysql database from R. I have  
recently upgraded to Mac OSX 10.6 and am having some trouble getting R  
to connect. My
setup worked fine in Mac OS X 10.5.

Specifically I can set up a dsn and test it in ODBC Administrator  
fine, but when I try in R using

con <- odbcConnect("test")

I get the following set of warnings, and the program hangs.

Warning messages:
1: In odbcDriverConnect("DSN=test") :
  [RODBC] ERROR: state 00000, code 8663360, message [iODBC][Driver  
Manager]dlopen(/opt/local/lib/libmyodbc5.so, 6): no suitable image  
found.  Did find:
	/opt/local/lib/libmyodbc5.so: mach-o, but wrong architecture
2: In odbcDriverConnect("DSN=test") :
  [RODBC] ERROR: state IM003, code 8663360, message [iODBC][Driver  
Manager]Specified driver could not be loaded
3: In odbcDriverConnect("DSN=test") :
  [RODBC] ERROR: state IM003, code 8663360, message [iODBC][Driver  
Manager]Specified driver could not be loaded
4: In odbcDriverConnect("DSN=test") :
  [RODBC] ERROR: state IM003, code 8663360, message [iODBC][Driver  
Manager]Specified driver could not be loaded
5: In odbcDriverConnect("DSN=test") :
  [RODBC] ERROR: state IM003, code 8663360, message [iODBC][Driver  
Manager]Specified driver could not be loaded
6: In odbcDriverConnect("DSN=test") :
  [RODBC] ERROR: state IM003, code 8663
etc...

The test dsn is just a connection to the mysql test database, and I  
have verified the connection is working using ODBC administrator on  
the Mac.

Has anyone experienced similar problems?

Thanks

Dan
#
Well, use file on the library, like

# file /opt/local/lib/libmyodbc5.so

to see what architecture the file supports.  My guess is that the
library is 32 bit only and your R is 64 bit.  But that could be
completely wrong, I have no mysql nor odbc experience on the Mac.

Kasper
On Tue, Jun 1, 2010 at 11:52 AM, Dan Rowlands <dan at onsemble.ws> wrote: