[R] odbcConnect - no data source and default driver

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Mar 20 20:00:42 CET 2007


You need to read the documentation for your ODBC driver manager 
(presumably iODBC) on your unstated OS.  You do need to set up a DSN or 
driver and the error message is that you have not done so.

[I have used iODBC in the past but no longer do so.  As I recall Debian 
Linux has it set up in a non-standard way so you do need the right set of 
instructions.]

On Tue, 20 Mar 2007, Young Cho wrote:

> I am trying to connect sybase sql databast from R using RODBC pkg and
> getting the following error ( i chnaged names to my***  but when I actually
> execute it, I put down names explicitly not calling some character strings)
>
>> channel = odbcConnect(dsn='mydsn',uid='myid',pwd='mypasswd')
> 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(st, case = case,
> believeNRows = believeNRows)
>> channel =
> odbcDriverConnect('SERVER=mydsn;DATABASE=my_subdb;UID=myid;PWD=mypasswd')
> Warning messages:
> 1: [RODBC] ERROR: state IM007, code 5768012, message [iODBC][Driver
> Manager]No data source or driver specified, dialog prohibited
> 2: ODBC connection failed in:
> odbcDriverConnect("SERVER=mydsn;DATABASE=my_subdb;UID=myid;PWD=mypasswd")
>
> I can see the connection by ping the server in a xterm:
>
> ~ > ping mydsn
> mydsn is alive
>
> Can you give me an advice how to create the channel object correctly? Thanks
> so much!
>
> Young
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley at 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-help mailing list