[R] RODBC --How do you set up the connection so pwd is blank but driver-specific data source dialog box pops up after
Daniel J. Robertson
djr47 at cornell.edu
Mon Apr 22 22:50:42 CEST 2013
The password window popup apparently doesn't yet work with RStudio:
Senior Research and Planning Associate
Institutional Research and Planning
Cornell University / irp.cornell.edu
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Lopez, Dan
Sent: Monday, April 22, 2013 4:41 PM
To: R help (r-help at r-project.org)
Subject: [R] RODBC --How do you set up the connection so pwd is blank but driver-specific data source dialog box pops up after
I want to leave pwd blank (to comply w/ company security protocol) and just be prompted by the driver-specific data source dialog box to enter the password after. But for some reason it is not working.
R Version: "R version 2.15.1 (2012-06-22)"
R Studio Version: 0.97.312
OS: Windows 7
##HERE IS THE CODE THAT DOES WORK
##my DSN, UID, PWD is entered something like this ch <- odbcConnect("jjprd", uid = "lopez123", pwd = "123456") ##I then successfully run a query sqlQuery(ch,"SELECT Count(*) FROM PS_EXIT_SURVEY_LL")
#BUT WHEN I TRY TO LEAVE pwd BLANK THIS HAPPENS:
ch <- odbcConnect("jjprd", uid = "lopez123") Warning messages:
1: In odbcDriverConnect("DSN=jjprd;UID=lopez123") :
[RODBC] ERROR: state 28000, code 768, message [Microsoft][ODBC driver for Oracle][Oracle]ORA-01017: invalid username/password; logon denied
2: In odbcDriverConnect("DSN=jjprd;UID=lopez123") : ODBC connection failed
#I read the vignette and on page 3 its says that if you leave password blank then a driver-specific Data Source dialog box will pop up to allow it to be completed. This is the way it works in MS Access or TOAD (SQL editor) for example. But it's not popping up? What am I missing?
HRIM - Workforce Analytics & Metrics
Strategic Human Resources Management
[[alternative HTML version deleted]]
R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help