Apologies, but after a fair amount of digging, I still only have a foggy understanding of the cause of this problem, due to my own ignorance. I hope to use RODBC package to connect to an Access DB when running 64 bit Win7 (R version 2.11.1, 64 bit). I have successfully done this before on a winXP machine. Currently I am unable to establish a connection using odbcConnect("") (I am able to establish a MySQL connection just fine), which I suspect may be a result of the driver setup location varying for 64 bit Win7 and 32 bit Win7. That is, to create a ODBC connection when running 64 bit Win7 the default executable file appears to NOT be the correct c:\windows\sysWOW64\odbcad32.exe but rather is c:\windows\system32\odbcad32.exe. odbcConnect returns a Microsoft error of "specified DSN contains an architecture mismatch between the Driver and Application" I am guessing wildly here, but I wonder if odbcConnect is looking in the wrong directory for my MS Access driver, as Microsoft hasn't even managed to make the default location one is directed to to manage ODBC connections via the control panel to be correct? I also suspect that if I installed a 32 bit version of R, odbcConnect might correctly find the location of my MS Access driver. Clearly I'm a pretty confused about this, but I hope one of you old pros on RODBC that is knowledgeable of the peculiarities of 64 bit Win 7 can give me some guidance. Thanks in advance - Peter [[alternative HTML version deleted]]
Dennis Murphy
2010-Sep-16 17:50 UTC
[R] RODBC Access/Excel driver location for 64 bit Win7
Hi: On Thu, Sep 16, 2010 at 8:55 AM, Peter Holck <holck@hawaii.edu> wrote:> Apologies, but after a fair amount of digging, I still only have a foggy > understanding of the cause of this problem, due to my own ignorance. > > I hope to use RODBC package to connect to an Access DB when running 64 bit > Win7 (R version 2.11.1, 64 bit). I have successfully done this before on a > winXP machine. Currently I am unable to establish a connection using > odbcConnect("") (I am able to establish a MySQL connection just fine), > which > I suspect may be a result of the driver setup location varying for 64 bit > Win7 and 32 bit Win7. That is, to create a ODBC connection when running 64 > bit Win7 the default executable file appears to NOT be the correct > c:\windows\sysWOW64\odbcad32.exe but rather is > c:\windows\system32\odbcad32.exe. odbcConnect returns a Microsoft error of > "specified DSN contains an architecture mismatch between the Driver and > Application" >For 64-bit WIn 7, I needed to use the ODBC in c:\windows\sysWOW64\odbcad32.exe. I configured RODBC in the 'usual' way for the 64-bit ODBC (i.e., per the R Import/Export manual) and everything is fine. When I used the default ODBC (32-bit), it could never find the files I wanted to register in MySQL, and I assume the same would happen for any other database not natively registered in 32-bit ODBC. I did some hunting on the net to find where was the 64-bit version, and since I've started using it on my 64-bit OS, I've had zero problems using ODBC and RODBC. I make sure to have a desktop shortcut to it so I don't forget :) HTH, Dennis I am guessing wildly here, but I wonder if odbcConnect is looking in the> wrong directory for my MS Access driver, as Microsoft hasn't even managed > to > make the default location one is directed to to manage ODBC connections via > the control panel to be correct? > > I also suspect that if I installed a 32 bit version of R, odbcConnect might > correctly find the location of my MS Access driver. > > Clearly I'm a pretty confused about this, but I hope one of you old pros on > RODBC that is knowledgeable of the peculiarities of 64 bit Win 7 can give > me > some guidance. > > Thanks in advance - Peter > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]