[R] RODBC, postgresql on Linux

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jan 11 09:38:04 CET 2008


On Thu, 10 Jan 2008, Poizot Emmanuel wrote:

> Dear all,
>
> I facing pbs using RODBC library.
> I'm working on a Linux (Ubuntu Gutsy) os, with R version 2.5.1.
> I've got Postgresql 8.2.5 installed with the odbc-postgresql package.
> I try to connect in a R session to a  postgresql database using:
>
> odbcConnect(dsn="thedatabasename",uid="theuser",pwf="thepasswd",case="postgresql")
> I get a message error, connection failes in odbcDriverConnect(...)
> I don't know where I'm wrong, as I verified the postgresql deamon is ok and 
> that the database I want to access is defined.

You should get a quite extensive error message giving the real error.  But 
note that a DSN is not "thedatabasename", and I suspect you have not set 
up the DSN correctly: see RODBC's README.

First get your DSN working in isql: RODBC is not an ODBC tutorial (but its 
documentation does reference such).

-- 
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