[R] RJDBC
Jose Sierra
jose.sierra at integromics.com
Mon Mar 5 16:07:14 CET 2007
I need help.
I'm trying to connect with an Oracle DBMS and MySQL DBMS, I'm using
RJDBC package.
My code is the next:
library('rJava')
library('DBI')
library('RJDBC')
//Mysql
drv <-
JDBC("com.mysql.jdbc.Driver","C:\\Temporal\\mysql-connector-java-3.0.9-stable-bin.jar","'")
conn <- dbConnect(drv, "jdbc:mysql://localhost:3306/bd", "user",
"password")
//Oracle
drv <-
JDBC("oracle.jdbc.driver.OracleDriver","C:\\Temporal\\classes12.jar","'")
conn <-
dbConnect(drv,"jdbc:oracle:thin:@192.168.1.70:1521:SDS22","user","password")
R always returns for oracle
"Error en .local(drv, ...) : Unable to connect JDBC to
jdbc:oracle:thin:@192.168.1.70:1521:SDS22"
and for mysql
"Error en .local(drv, ...) : Unable to connect JDBC to
jdbc:mysql://localhost:3306/bd"
And the function summary(drv) returns:
JDBCDriver
name = JDBC
driver.version = 0.1-1
DBI.version = 0.1-1
client.version = NA
max.connections = NA
R version 2.4.1 (2006-12-18) i386-pc-mingw32
locale:
LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252
attached base packages:
[1] "stats" "graphics" "grDevices" "utils" "datasets"
"methods" [7] "base"
other attached packages:
RJDBC DBI rJava "0.1-2" "0.1-12" "0.4-14"
Can you help me, please?
Another question:
I try to compile ROracle and RMysql for windows but i need Rdll.lib and
it need R.exp. Can you give me one of this files?
Regards.
Jose Sierra
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
More information about the R-help
mailing list