Quantcast

Get data from Access 2010 database

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Get data from Access 2010 database

kpzimmer
Hello,

I'm new to R and am trying to access data from a Microsoft Access 2010 database. I've read through the RODBC package vignette and seem to understand the instructions of the commands but can't see to connect to the database. I have installed the Access Database Engine from the Microsoft website.  I get the following errors when I try to connect:

> channel <- odbcConnect("K:/UWRRDatabase_9Feb2012")
Warning messages:
1: In odbcDriverConnect("DSN=K:/UWRRDatabase_9Feb2012") :
  [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
2: In odbcDriverConnect("DSN=K:/UWRRDatabase_9Feb2012") :
  ODBC connection failed

I setting up a ODBC connection in ODBC data sources in the Administrative Tools of Control panel and also through
C:\WINDOWS\SysWOW64\odbcad32.exe
but I must not be setting things up correctly.

Any advice or suggestions to solve this problem would be much appreciated.

Thanks in Advance.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Get data from Access 2010 database

Jeff Newmiller
AFAIK you need to use the 32bit version of R for getting the data. Then you can save it into a more versatile format and re-read it if you really need to run R in 64 bit mode.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

kpzimmer <[hidden email]> wrote:

>Hello,
>
>I'm new to R and am trying to access data from a Microsoft Access 2010
>database. I've read through the RODBC package vignette and seem to
>understand the instructions of the commands but can't see to connect to
>the
>database. I have installed the Access Database Engine from the
>Microsoft
>website.  I get the following errors when I try to connect:
>
>> channel <- odbcConnect("K:/UWRRDatabase_9Feb2012")
>Warning messages:
>1: In odbcDriverConnect("DSN=K:/UWRRDatabase_9Feb2012") :
>  [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver
>Manager] Data source name not found and no default driver specified
>2: In odbcDriverConnect("DSN=K:/UWRRDatabase_9Feb2012") :
>  ODBC connection failed
>
>I setting up a ODBC connection in ODBC data sources in the
>Administrative
>Tools of Control panel and also through
>C:\WINDOWS\SysWOW64\odbcad32.exe
>but I must not be setting things up correctly.
>
>Any advice or suggestions to solve this problem would be much
>appreciated.
>
>Thanks in Advance.
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/Get-data-from-Access-2010-database-tp4511271p4511271.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Get data from Access 2010 database

Prof Brian Ripley
On 28/03/2012 06:28, Jeff Newmiller wrote:
> AFAIK you need to use the 32bit version of R for getting the data. Then you can save it into a more versatile format and re-read it if you really need to run R in 64 bit mode.

Not quite: you need to run R of the same architecture as your ODBC
drivers, which in this case is the same architecture as your version of
ADE (usually installed as part of Office).  We don't have the 'at a
minimum' information required by the posting guide, so I at least do not
know what version of Windows nor what architecture of R was used.

More details in the RODBC manual ....


> ---------------------------------------------------------------------------
> Jeff Newmiller                        The     .....       .....  Go Live...
> DCN:<[hidden email]>         Basics: ##.#.       ##.#.  Live Go...
>                                        Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
> ---------------------------------------------------------------------------
> Sent from my phone. Please excuse my brevity.
>
> kpzimmer<[hidden email]>  wrote:
>
>> Hello,
>>
>> I'm new to R and am trying to access data from a Microsoft Access 2010
>> database. I've read through the RODBC package vignette and seem to
>> understand the instructions of the commands but can't see to connect to
>> the
>> database. I have installed the Access Database Engine from the
>> Microsoft
>> website.  I get the following errors when I try to connect:
>>
>>> channel<- odbcConnect("K:/UWRRDatabase_9Feb2012")
>> Warning messages:
>> 1: In odbcDriverConnect("DSN=K:/UWRRDatabase_9Feb2012") :
>>   [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver
>> Manager] Data source name not found and no default driver specified
>> 2: In odbcDriverConnect("DSN=K:/UWRRDatabase_9Feb2012") :
>>   ODBC connection failed
>>
>> I setting up a ODBC connection in ODBC data sources in the
>> Administrative
>> Tools of Control panel and also through
>> C:\WINDOWS\SysWOW64\odbcad32.exe
>> but I must not be setting things up correctly.
>>
>> Any advice or suggestions to solve this problem would be much
>> appreciated.


--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] 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.
Loading...