[R-sig-DB] postgresql, r and windows
mruii@o m@iii@g oii cmim@@csic@es
mruii@o m@iii@g oii cmim@@csic@es
Fri Sep 9 17:12:15 CEST 2005
Dear R-DB users,
I have a problem in accessing postgresql from r.
I can only use library(RDOBC), because the drivers for postgresql (RdbiPgSQL)
from DBI are not available in windows (does anyone has tham?), so, using th ODBC...
library(RDOBC)
> chanel1=odbcDriverConnect("DRIVER=PostgreSQL; DBQ=campanhas") # it connects
> sqlTables(chanel1, "tbl_taxon")
TABLE_QUALIFIER TABLE_OWNER TABLE_NAME TABLE_TYPE
1 <NA> cripsul prova TABLE
2 <NA> cripsul tbl_biolo TABLE
3 <NA> cripsul tbl_dredg TABLE
(...)
> sqlColumns(chanel1, "tbl_taxon")
[1] TABLE_QUALIFIER TABLE_OWNER TABLE_NAME COLUMN_NAME
[5] DATA_TYPE TYPE_NAME PRECISION LENGTH
[9] SCALE RADIX NULLABLE REMARKS
<0 rows> (or 0-length row.names)
> sqlFetch(chanel1, sqtable="tbl_taxon") ## nao funciona
[1] "[RODBC] ERROR: Could not SQLExecDirect"
[2] "S1000 7 ERROR: relation \"tbl_taxon\" does not exist"
So, it does not access the data, although it knows that the table is there!!!
However, it does the connection with access or excell well
Thank you very much in advance,
Any light will be strongly apretiates,
Best wishes,
Marta
PS: I am working on a windows XP professional and R 2.1, postgresql 8.0.
More information about the R-sig-DB
mailing list