[R-sig-DB] Can't connect to postgresql with RODBC.
Prof Brian Ripley
r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Fri Oct 31 12:29:28 CET 2003
On Fri, 31 Oct 2003, Geotronix wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Hi,
>
> I've finally got a DSN working on my ODBC installation (via a
> ~/.odbc.ini file) and I've tested it with the ODBC DataManager so I'm
> sure it's working.
> However when trying to connect to the DSN via R interface I get an
> error:
>
> > channel <- odbcConnect("test", uid="ant", pwd="fr",
> > case="postgresql")
> Warning messages:
> 1: [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver
> Manager]Data source name not found, and no default driver specified
> 2: ODBC connection failed in: odbcDriverConnect(paste("DSN=", dsn,
> ";UID=", uid, ";PWD=", pwd,
> >
>
> Before the odbcCOnnect() command I gave the library(RODBC) command and
> it gave no error (I installed r-cran-rodbc on my woody).
>
> I'm using the PDF file "R data import/Export" as a guide and it doesn't
> recall any configuration for RODBC. What am I missing?
>
> If unixODBC finds my DSN why isn't RODBC finding it? (This means it's
> not a unixODBC problem, right?)
It is a unixODBC problem, as that's what gave the error message.
Check that you can access the DBMS from the same account and the same
directory.
--
Brian D. Ripley, ripley using 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-sig-DB
mailing list