[R-sig-DB] Connecting to libreoffice base with ODB package

Graham Smith myot|@two @end|ng |rom gm@||@com
Tue Feb 10 20:37:43 CET 2015


I am experimenting with this and have a small Libreoffice database (created
with version LR 4.4.0.3) to try and learn how this works.

So far I have run these commands (its ODB 1.1.1)

con <-
odb.open("~/Dropbox/2015/Projects/LibreofficeDataBase/LRBaseTutorial.odb")
odb.tables(con)

The first two work fine and the two tables are printed out by R,

> odb.tables(con)
$tbl_nutrients
  field.name field.type data.type comment
1         ID    INTEGER   numeric      NA
2     Outlet       CHAR character      NA
3        Fat    DECIMAL   numeric      NA
4    Protein    DECIMAL   numeric      NA
5     Sodium    DECIMAL   numeric      NA
6  Pottasium    DECIMAL   numeric      NA

$`tbl-Nuclear`
                              field.name field.type data.type comment
1                                     ID    INTEGER   numeric    <NA>
2                            institution    VARCHAR character    <NA>
3                                 status    VARCHAR charact
etc etc


but

nutrients <- odb.read(con, "SELECT * FROM tbl_nutrients")

gives the error:

Error: Error while executing SQL query  : "Unable to retrieve JDBC result
set for SELECT * FROM tbl_nutrients (Table not found in statement [SELECT *
FROM tbl_nutrients])"

This is rather new to me, so I wondered if anyone could point out any
obvious thing I am doing wrong.

Its R version 3.1.2, in Rstudio 0.98.1091 running on Mac/Maverick.

Thanks,

Graham

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-db/attachments/20150210/da021c59/attachment.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: LRBaseTutorial.odb
Type: application/vnd.oasis.opendocument.database
Size: 28473 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-db/attachments/20150210/da021c59/attachment.odb>


More information about the R-sig-DB mailing list