[BioC] Rdbi.PgSQL

Sean Davis sdavis2 at mail.nih.gov
Thu Mar 24 21:57:10 CET 2005


On Mar 24, 2005, at 3:29 PM, Hrishikesh Deshmukh wrote:

> Hi All,
>
> library(RdbiPgSQL)
>
> #Connect to DB
> conn <- dbConnect(PgSQL(), host = "localhost", dbname
> = "^^^^^",user="&&&&",password="#####")
>
> tt <- dbSendQuery(conn,"SELECT * FROM table WHERE
> signalrawintensity >= 200 and signalrawintensity <=
> 20000 and pm_mm_other >=0")
> mytt <- dbGetResult(tt)
>
> This works fine but when i run:
> tt1 <- dbSendQuery(conn,"Create table trial as SELECT
> * FROM all254gnxdt1 WHERE signalrawintensity >= 200
> and signalrawintensity <= 20000 and pm_mm_other >=0")
> rd<-dbReadTable(conn,trial)
>
> I get this error:
> mylin <- dbGetResult(lin)

You need to do:

rd <- dbReadTable(conn,"trial")

Note the quotes.

The "did not produce any tuples" is a bit misleading at times.  I have 
found that usually means that I messed up a command (bad SQL, etc), so 
it usually means go back to check your query.

Hope that helps.
Sean



More information about the Bioconductor mailing list