Hi:
Since I'm the culprit of that post, is your Access database on your 64-bit
machine or is it on a remote server? In my case, I have 32-bit MySQL on a
64-bit Win7 system and I've used RODBC several times to upload a file to R,
but it was to 32-bit R (I just checked to be sure). It doesn't work on
64-bit R. [See below for the transcript.]
The comments in the post to which you referred concerned how to set up ODBC
on a 64-bit system when one had a 32-bit database and 32-bit R. To access
the right ODBC for that setup, you have to grab it from the directory
mentioned in the post. As mentioned there, I put a shortcut to it on my
desktop so I don't have to go on a fishing expedition to find it again. As
far as I can tell, there has to be coordination among R, the database and
ODBC in the sense that they all must be 32-bit or all 64-bit.
Since I don't use databases all that often, my dodge is to read the files in
with 32-bit R, save them as R binaries and then work with those in 64-bit R
- but I've got enough disk space and RAM to afford to do that. Your mileage
may vary.
64-bit R:> library(RODBC)
> ch <- odbcConnect('gameday10', uid = 'dennis', pwd =
'')
Warning messages:
1: In odbcDriverConnect("DSN=gameday10;UID=dennis") :
[RODBC] ERROR: state IM014, code 0, message [Microsoft][ODBC Driver
Manager] The specified DSN contains an architecture mismatch between the
Driver and Application
2: In odbcDriverConnect("DSN=gameday10;UID=dennis") :
ODBC connection failed
32-bit R:> library(RODBC)
> ch <- odbcConnect('gameday10', uid = 'dennis', pwd =
'')
> sqlTables(ch)
TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS
1 gameday10 atbat TABLE
Hope this clarifies matters somewhat.
Dennis
On Fri, Dec 17, 2010 at 11:48 AM, Alexander Shenkin
<ashenkin@ufl.edu>wrote:
> Hello Folks,
>
> I do hope this is the correct place to post (and not in R-SIG-DB). I have
> spent the better part of a day searching for an answer to this question,
> and
> have yet to resolve it.
>
> I am trying to query an .accdb Access database (with 32-bit Office 2007
> currently residing on the machine) with 64-bit R via RODBC. There seem to
> be some conflicting accounts as to whether or not this is possible.
> Ripley's ODBC Connectivity PDF and the odbcConnect docs indicate it is
not
> possible (copied below for reference). However, this thread (
>
>
http://r.789695.n4.nabble.com/RODBC-Access-Excel-driver-location-for-64-bit-Win7-td2542550.html
> )
> seems to indicate that it may be possible by using
> c:\windows\sysWOW64\odbcad32.exe:
> "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."
>
> I have tried creating DSN's using c:\windows\sysWOW64\odbcad32.exe and
> referencing those with RODBC, but I come up with errors:
>
> > library(RODBC);
> > channel <- odbcConnect("myDSN");
> Warning messages:
> 1: In odbcDriverConnect("DSN=myDSN") :
> [RODBC] ERROR: state IM014, code 0, message [Microsoft][ODBC Driver
> Manager] The specified DSN contains an architecture mismatch between the
> Driver and Application
> 2: In odbcDriverConnect("DSN=myDSN") : ODBC connection failed
>
> If anyone knows any more about this issue, I would be grateful for the
> information!
>
> Thanks,
> Allie
>
> R 2.12.0
> Windows 7 Pro x64
> Access 2007
>
>
> from Ripley's ODBC Connectivity
> "32-bit Windows drivers for Access 2007 and Excel 2007 are bundled
with
> Office 2007 but can be installed separately via the installer
> AccessDatabaseEngine.exe available from .... The Access/Excel 2010 versions
> at ... have a 64-bit version: however the 64-bit drivers cannot be
> installed
> alongside 32-bit versions of Office (as far as we know, and defnitely not
> for Office 2007)."
>
> odbcConnect docs:
> "You must have the 32-bit drivers when using 32-bit R and the 64-bit
> drivers
> when using 64-bit R: otherwise there will be a cryptic message about a
> driver not being found. And the 64-bit drivers cannot be installed
> alongside
> 32-bit Microsoft Office, and vice versa."
>
> [[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]]