[R] RODBC on Mac OSX pointers?

David Orme d.orme at ic.ac.uk
Wed Oct 15 16:04:14 CEST 2003


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




More information about the R-help mailing list