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-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Oliver Bandel Sent: Friday, August 28, 2009 10:22 AM To: r-h...@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@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 ______________________________________________ R-help@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.