[R] RODBC: how to set the data-source?
Dumblauskas, Jerry
jerry.dumblauskas at credit-suisse.com
Fri Aug 28 18:48:44 CEST 2009
Looks like Unix....
If so, make sure your script has the proper paths set
Here is my set up for an oracle DB
export LD_LIBRARY_PATH=/../../instantclient_11_1:/../../unixODBC64_1/lib
export ODBCINI=/../..//unixODBC64_1
export ODBCSYSINI=/../..//unixODBC64_1
And of course you need your db defined in ODBC.ini and this will link to
your driver code...
hth
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Oliver Bandel
Sent: Friday, August 28, 2009 10:22 AM
To: r-help at stat.math.ethz.ch
Subject: [R] RODBC: how to set the data-source?
Hello,
I want to try to connect R to PostgreSQL.
I have found that there are three ways:
DBI or RODBC or RPostgreSQL.
I tried around with DBI and RODBC but didn't get it running.
In both cases I'm not clear about how to set the driver/data source.
I get this error:
x > channel <- odbcConnect("rtest", uid="oliver") x Warning messages:
x 1: In odbcDriverConnect(st, ...) :
x [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver
Manager]Data
x source name not found, and no default driver specified x 2: In
odbcDriverConnect(st, ...) : ODBC connection failed x >
So I somehow have to set the Driver.
But how?
I didn't find it out.
Ciao,
Oliver
______________________________________________
R-help at r-project.org 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.
===============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
More information about the R-help
mailing list