[R] ROracle problem.

2005-02-07 Thread Tae Sik Han
ROracle ploblem

I can't install ROracle in the window XP. Is there any
way to install ROracle package on the windows OS ? I
think I can enhance data acquisition performance using
oracle native dirver instead of using ODBC.

Tae Sik Han.
North Carolina State University.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] R-DCOM server problem.

2005-02-07 Thread Tae Sik Han
R-DCOM server problem

My program (VB program) runs R-program through R DCOM
server. No problem to run statistical functions and my
own functions. However When I tried to load data using
ODBC I got an error message.
I need to set up any parameter for R-DCOM server for
ODBC ?  


library(DBI);
library(RODBC);
con = odbcConnect("odbc_db_string", uid = "uid",
pwd="pwd");
tlist = sqlQuery(con, "select tname from source_tab");

--- Error message ---
An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred
in matcher.exe
Additional information: Object is static; operation
not allowed


Tae Sik Han.
North Carolina State University.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] call RODBC function from DCOM

2005-02-02 Thread Tae Sik Han
Hi.

My VB program run a R - script located in the server
with R DCOM server. The R - script is designed to send
a query to DB through ODBC. There is NOT any problem
when I run each code from R-window interface. 

However, when I call the R-script from my VB program
it stucked after calling "sqlQuery" statement. I can
check that odbcConnect(dsn, uid, pwd) returns -1.

--VB code-
str = "setwd(" +  + "C:/Program
Files/R/rw2001" +  + ")"
RLink.EvaluateNoReturn(str)
str = "source(" +  + "a.R" +  + ")"
RLink.EvaluateNoReturn(str)


--R script:
"a.R"-
library(RODBC);

con = odbcConnect("dsn", uid = "...", pwd="s...");
tlist = sqlQuery(con, "select tname from cols");


--Error message 

An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred
in MY_VB.exe

Additional information: Object is static; operation
not allowed


I need to do more to correctly set up DCOM server for
ODBC ?

Thanks and regards,

Eliot.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] How to run R-script from remote VB program

2005-02-02 Thread Tae Sik Han
I have installed D COM server1.35 and can send a line
of R code and get a result from my VB (.net) program.

So I located all the  R commands in a file ("a.R") in
the dir path ("c:\") then call VB using source as
below.

Dim RLink As StatConnector
RLink = New StatConnector  
RLink.Init("R")

dim str
str = "source(" + """" + "c:\a.R" + """" + ")"
RLink.EvaluateNoReturn(str)


I got an error message  :
An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred
in MY_VB.exe
Additional information: Object is static; operation
not allowed

"a.R" has codes to load RODBC package and collecting
and running query result to the Oracle DB.

How can I run the R-code script remotely from VB
program ?

I appreciate your help.

Regards,

Tae Sik Han.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html