[R] RODBC Error

From: Michael Greene <mfgreene_at_bu.edu>
Date: Sun 30 Oct 2005 - 08:59:45 EST

Hello,

I'm using R 2.2.0 on a Mac and attempting to use the RODBC package to connect to a PostgreSQL server on the local network. I can't tell whether my problem is in R, or in ODBC setup.

I got drivers from OpenLink, created a dsn and tested it using the iODBC application. then I load the RODBC package, use this code and get the following error. I tried with both the odbcConnect util and the odbcDriverConnect util. I am able to connect to the database through other non-odbc based database programs from the Mac, so I know it's not a Postgres setting (like no tcp/ip connections or something).

> library(RODBC)
> channel <- odbcConnect("nfl",uid="postgres", pwd="xxx")
Warning messages:
1: [RODBC] ERROR: Could not SQLDriverConnect 2: ODBC connection failed in: odbcDriverConnect(st, case = case, believeNRows = believeNRows)
>
> channel2 <- odbcDriverConnect(connection="DSN=nfl, UID=postgres,
PWD=vladdy79" )
Warning messages:
1: [RODBC] ERROR: state IM002, code 0, message [iODBC][Driver Manager] Data source name not found and no default driver specified. Driver could not be loaded
2: ODBC connection failed in: odbcDriverConnect(connection = "DSN=nfl, UID=postgres, PWD=xxx")

Does anyone have any suggestions?

Thanks,

Michael Greene



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Oct 30 09:06:39 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:53 EST