[R] RODBC - dsn specification

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 2 22:59:16 CET 2002


/ ought to work, but I suspect there is a problem with spaces in the file
name, so try the short name:  "C:/PROGRA~1/ODBC/sql.dsn", probably.

You can almost always use / as the directory separator on Windows.


On Wed, 2 Jan 2002, Sukhaswami Malladi wrote:

> Happy New Year to all in the list!
>
> I am trying to issue an SQL query to a database from R using
> RODBC (on Windows). The data source file is on my PC hard
> disk : C:\Program Files\ODBC\sql.dsn
>
> The "\" character does not get interpreted properly in R - it
> is removed from the file-spec string or if I specify "\\" it
> appears as such with a syntax error in
>
> odbcConnect(dsn, uid="", pwd="", host="localhost", case="nochange")
>
> Can anyone there write the correct syntax so as to specify the
> dsn in the "odbcConnect" function for opening the channel for doing
> a query ?
>
> Thanks in advance,
> swami
>
>
>
> ***************************************************************************
>  The contents of this communication are intended only for the addressee and
> may contain confidential and/or privileged material. If you are not the
> intended recipient, please do not read, copy, use or disclose this
> communication and notify the sender.  Opinions, conclusions and other
> information in this communication that do not relate to the official
> business of my company shall be understood as neither given nor endorsed by
> it.
> ***************************************************************************
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list