[R] ROracle and select query empty

From: Mathieu Drapeau <mathieu.drapeau_at_mcgill.ca>
Date: Fri 26 Aug 2005 - 03:29:49 EST


Hi,
I just installed ROracle and RDBI. The connection to the database seems to work also. My problem is when I am selection rows that really exist in the database, it is returning nothing. Where should I look to see what could be my problem?

Thank you very much,
Mathieu

> drv <- dbDriver("Oracle")
> summary(drv, verbose=TRUE)

<OraDriver:(6721)>
  Driver name: Oracle (ProC/C++)
  Max connections: 10
  Conn. processed: 8
  Default records per fetch: 500
  Oracle R/S client version: 0.5-4
  RS-DBI version: 0.1-9
  Open connections: 2
    1 <OraConnection:(6721,0)>
    2 <OraConnection:(6721,7)>
>
> conn <- dbConnect(drv, "mathieu/toto@MYDB")
> summary(conn, verbose=TRUE) <OraConnection:(6721,7)>
  User: mathieu
  Dbname: MYDB
  Oracle Server version:
>
> rs <- dbSendQuery(conn, statement = paste("select * from cat"))
> summary(rs, verbose=TRUE)

<OraResult:(6721,7,2)>
  Statement: select * from cat
  Has completed? no
  Affected rows: 0
  Rows fetched: -1
  Fields:

        name    Sclass     type len precision scale isVarLength nullOK
1 TABLE_NAME character VARCHAR2  30         0     0        TRUE  FALSE
2 TABLE_TYPE character VARCHAR2  11         0     0        TRUE   TRUE

>
> myContent <- fetch(rs, n = -1)
> myContent

[1] TABLE_NAME TABLE_TYPE
<0 rows> (or 0-length row.names)
> summary(myContent, verbose=TRUE)
  TABLE_NAME         TABLE_TYPE
 Length:0           Length:0

 Class :character Class :character
 Mode :character Mode :character
> summary(rs, verbose=TRUE)

<OraResult:(6721,7,2)>
  Statement: select * from cat
  Has completed? yes
  Affected rows: 0
  Rows fetched: -1
  Fields:
        name    Sclass     type len precision scale isVarLength nullOK
1 TABLE_NAME character VARCHAR2  30         0     0        TRUE  FALSE
2 TABLE_TYPE character VARCHAR2  11         0     0        TRUE   TRUE

______________________________________________
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 Received on Fri Aug 26 03:35:46 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:56 EST