[R] RODBC - problems using odbcDriverConnect without DSN

From: Josiah Walker <merlz42_at_gmail.com>
Date: Mon, 21 Jul 2008 12:35:50 +1000


Hi,

I'm trying to use RODBC without having to set up a DSN, using hte direct connection string in odbcDriverConnect. My connection attempt looks something like:
> odbcDriverConnect(connection = "SERVER=localhost;DRIVER={/usr/lib/odbc/libmyodbc.so};DATABASE=myDB;UID=reader;PASSWORD=insecure;")

And this returns the message:
Warning messages:
1: In odbcDriverConnect(connection = conn) :   [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data source name not found, and no default driver specified 2: In odbcDriverConnect(connection = conn) : ODBC connection failed

I know this means it can't find x connection in the dsn... which means my connection string isn't recognised as valid. I've used ODBC and ODBC connection strings before, but I can't work out why this wouldn't work here. I can successfully create the same connection using a user DSN with the same settings as this, but this connection string won't work. It's fairly important for this project that the code can connect without a DSN needing to be set on every computer that runs it. Does anyone know if I'm missing something in my connection string, or can this not be done using RODBC?

Thanks,
Josiah.



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. Received on Mon 21 Jul 2008 - 03:56:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 Jul 2008 - 07:32:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive