[R] dsn

David Middleton DMiddleton at fisheries.gov.fk
Thu Mar 18 16:24:14 CET 2004


Margarida

> odbcConnect("H:\\Desktop\\bd1",uid="tiago",pwd="archi",case="nochange",believeNRows=TRUE)
> [1] -1
> Warning messages:
> 1: [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver 
> Manager]Data source name not found, and no default driver specified

You simply need to give the data source name (DSN), not a path, as the first argument to odbcConnect.  If you want to connect directly to a database file, rather than via a DSN, the RODBC package also provides odbcConnectAccess etc.

I am slightly surprised that you appear to be using unixODBC on what appears to be (from the path specification) a windows system.  I guess this may be possible via cygwin - maybe there's even a win32 release of unixODBC.  RODBC works fine with the standard MS ODBC setup on windows systems as far as I can tell.

David




More information about the R-help mailing list