Hi, I have a data base in oracle and need to link R using ODBC. When i use the command odbcConnect a dsn is needed. I would like to create a dsn.Do you know how can i do it? Thank you. Margarida,Portugal
Hi
If you are using windows then do this:
Basically you need to add your oracle database as an ODBC data source.
Control Panel -> Administrative tools -> Data Sources (ODBC)
Select the System DSN tab and then Add. Select which type of Data source
i.e. Oracle database. Then follow the instructions.
Regards
Wayne
-----Original Message-----
From: Margarida Júlia Rodrigues Igreja [mailto:migreja@med.up.pt]
Sent: 01 March 1997 20:48
To: R-help@stat.math.ethz.ch
Subject: [R] dsn
Hi,
I have a data base in oracle and need to link R using ODBC.
When i use the command odbcConnect a dsn is needed.
I would like to create a dsn.Do you know how can i do it?
Thank you.
Margarida,Portugal
______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
KSS Ltd
Seventh Floor St James's Buildings 79 Oxford Street Manchester M1 6SS
England
Company Registration Number 2800886
Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305
mailto:kssg@kssg.com http://www.kssg.com
The information in this Internet email is confidential and m...{{dropped}}
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 specifiedYou 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
Hi,
I've finally got a DSN working on my ODBC installation and I've tested
it
with the ODBC DataManager so I'm sure it's working.
However when trying to connect to the DSN via R interface I get an error:
>
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
2: ODBC connection failed in: odbcDriverConnect(paste("DSN=", dsn,
";UID=",
uid, ";PWD=", pwd,
Before the odbcCOnnect() command I gave the library(RODBC) command and it
gave no error
What am I missing?
Margarida