[R] RODBC on Mac OSX pointers?

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Oct 16 10:58:51 CEST 2003


RODBC has been used with iODBC under Linux, so your suspicion is wrong 
(and contradicted by the RODBC documentation).

Nevertheless, your error message shows that your build is trying to use 
unixODBC, so I suspect you built it against the wrong ODBC driver manager.

On Wed, 15 Oct 2003, David Orme wrote:

> Hi,
> 
> I'm trying to get to grips with accessing my postgresql tables in R 
> using RODBC. I have Mac OS 10.2.8 (Darwin 6.8) installed and R 1.8.0 
> installed from source and I have updated RODBC to 1.0-4.
> 
> On the ODBC manager end, I am using OpenLink software's iODBC 
> Administrator and I've set up a User DSN called "PostGRES"  - odbctest 
> suggests that this is functioning:
> 
> > [doibook:~] dorme% /usr/bin/odbctest
> > iODBC Demonstration program
> > This program shows an interactive SQL processor
> >
> > Enter ODBC connect string (? shows list): dsn=PostGRES
> >
> > Have a nice day.
> > [doibook:~] dorme%
> 
> However, when I try to access the connection from R I get the following:
> 
> > > test <- odbcConnect(dsn="PostGRES", uid="dorme", pwd="secret", 
> > case="postgresql")
> > Warning messages:
> > 1: [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver 
> > Manager]Data so
> > urce name not found, and no default driver specified
> > 2: ODBC connection failed in: odbcDriverConnect(paste("DSN=", dsn, 
> > ";UID=", uid,
> >  ";PWD=", pwd,
> 
> Any suggestions? My suspicion is that RODBC requires unixODBC and 
> doesn't know about iOBDC, but in which case I wouldn't expect to see a 
> Driver Manager error code.
> 
> Thanks,
> David
> 
> 
> ---------------------------------------
> Dr. David Orme
> 
> Department of Biological Sciences
> Imperial College London
> Silwood Park Campus
> Ascot, Berkshire SL5 7PY UK.
> 
> Tel: +44 (0)20 759 42358
> Fax: +44 (0)20 759 42339
> e-mail: d.orme at imperial.ac.uk
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
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




More information about the R-help mailing list