RE: [R] S/R/RWeb/ODBC

2004-06-16 Thread Fowler, Mark
Yes, however the same odbcConnect syntax works in the R Commands window. But
seemingly not from within a function in .Rprofile when using RWeb to run the
function in batch mode. Should mention I have no problem running the
function if I bring the data in from the PERL script that runs R. 

E.g.  (whatever edited)

Batch (passing function call via an RWeb PERL script)
library(RODBC)
channel-odbcConnect('xyz',uid='whatever',pw='whatever',dsn='whatever',case=
'nochange')
cat(\n,channel)

-1

Interactive
 library(RODBC)

channel-odbcConnect('xyz',uid='whatever',pw='whatever',dsn='whatever',case=
'nochange')
Warning message: 
NAs introduced by coercion 

 channel
RODB Connection 0
Details:
  case=nochange
  DSN=whatever
  UID=whatever
  PWD=whatever
  DBQ=whatever
  DBA=W
  APA=T
  FEN=T
  QTO=T
  FRC=10
  FDL=10
  LOB=T
  RST=T
  FRL=F
  MTS=F
  CSR=F
  PFC=10
  TLO=0


   Mark Fowler
   Marine Fish Division
   Bedford Inst of Oceanography
   Dept Fisheries  Oceans
   Dartmouth NS Canada
   [EMAIL PROTECTED]



-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] 
Sent: June 15, 2004 4:04 PM
To: Fowler, Mark
Cc: '[EMAIL PROTECTED]'
Subject: Re: [R] S/R/RWeb/ODBC


Sounds like a permissions/ownership problem.  odbcConnect returnign -1 
just means that the ODBC device manager failed.

On Tue, 15 Jun 2004, Fowler, Mark wrote:

 I'm looking for an optimal approach to access Oracle databases via 
 RWeb applications. I'm new to R but familiar with programming 
 functions and web pages for the S+ Statserver. I'm now going through 
 the motions of migrating
 S+/Statserver applications to R/RWeb as a feasability exercise. I can 
 S+access
 databases using ODBC directly in R or S, and using Statserver, but I 
 have not succeeded at extracting into R in RWebs batch mode. I can 
 'require RODBC' in .Rprofile with apparent success, but the results of 
 odbcConnect differ from those when the command is typed into the R 
 commands window. Instead of a parameter list I get a -1. Does anyone 
 know the solution to this problem? Also, might anyone know the 
 comparative merits of using some PERL module (like DBD::Oracle) to do 
 the extraction, as opposed to using RODBC (assuming RODBC can be 
 implemented in batch mode)? I'm currently using Apache on Windows XP 
 if relevant, but LINUX may be the final host (we'll compare, but those 
 more Web-wise than I expect LINUX to outperform Windows for our 
 purposes).
 
  Mark Fowler
  Marine Fish Division
  Bedford Inst of Oceanography
  Dept Fisheries  Oceans
  Dartmouth NS Canada
  [EMAIL PROTECTED]
  
 
 
 __
 [EMAIL PROTECTED] 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
 
 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] 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


Re: [R] S/R/RWeb/ODBC

2004-06-15 Thread Prof Brian Ripley
Sounds like a permissions/ownership problem.  odbcConnect returnign -1 
just means that the ODBC device manager failed.

On Tue, 15 Jun 2004, Fowler, Mark wrote:

 I'm looking for an optimal approach to access Oracle databases via RWeb
 applications. I'm new to R but familiar with programming functions and web
 pages for the S+ Statserver. I'm now going through the motions of migrating
 S+/Statserver applications to R/RWeb as a feasability exercise. I can access
 databases using ODBC directly in R or S, and using Statserver, but I have
 not succeeded at extracting into R in RWebs batch mode. I can 'require
 RODBC' in .Rprofile with apparent success, but the results of odbcConnect
 differ from those when the command is typed into the R commands window.
 Instead of a parameter list I get a -1. Does anyone know the solution to
 this problem? Also, might anyone know the comparative merits of using some
 PERL module (like DBD::Oracle) to do the extraction, as opposed to using
 RODBC (assuming RODBC can be implemented in batch mode)? I'm currently using
 Apache on Windows XP if relevant, but LINUX may be the final host (we'll
 compare, but those more Web-wise than I expect LINUX to outperform Windows
 for our purposes). 
 
  Mark Fowler
  Marine Fish Division
  Bedford Inst of Oceanography
  Dept Fisheries  Oceans
  Dartmouth NS Canada
  [EMAIL PROTECTED]
  
 
 
 __
 [EMAIL PROTECTED] 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
 
 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
[EMAIL PROTECTED] 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