[R-sig-DB] R MS-Sql database connection package

rikbr@dt m@iii@g oii xs4@ii@be rikbr@dt m@iii@g oii xs4@ii@be
Thu Oct 7 18:50:36 CEST 2004


Hello,

I ran some extra tests today with our R MS-SqlServer database connection
package. It appears the package still works with the most recent versions
of freetds. The connection package was still working with R Version 1.9.1.
It stopped working with R Version 2.0.0.

I've pasted a log that gives you and idea of how this component works
and where the error in the compilation under R Version 2.0.0 occurs.

In case you want to review the code I'm willing to post/mail it to an
approriate address. Within a few weeks we plan to start working on
this code, so that we have a functional database component for R Version
2.0.0. in the beginning of 2005.

Regards,

Rik

----------------------- LOG -----------------------
lt14008:/opt/R-1.9.1/bin # ./R CMD INSTALL
--configure-args='--with-freetds-dir=/opt/freetds-0.62.4/'
/usr/src/tgz/RDBLib_0.1-2.tar.gz
* Installing *source* package 'RDBLib' ...
creating cache ./config.cache
checking how to run the C preprocessor... cc -E
checking for dbinit in -lsybdb... no
checking for tds_configs.h... no
updating cache ./config.cache
creating ./config.status
creating src/Makevars
** libs
gcc -I/opt/R-1.9.1/lib/R/include -I/opt/freetds-0.62.4//include
-I/usr/local/include -D__NO_MATH_INLINES -mieee-fp  -fPIC  -g -O2 -c
RS-DBI.c -o RS-DBI.o
gcc -I/opt/R-1.9.1/lib/R/include -I/opt/freetds-0.62.4//include
-I/usr/local/include -D__NO_MATH_INLINES -mieee-fp  -fPIC  -g -O2 -c
RS-DBLib.c -o RS-DBLib.o
gcc -shared -L/usr/local/lib -o RDBLib.so RS-DBI.o RS-DBLib.o
-L/opt/freetds-0.62.4//lib -lsybdb
** R
** help
 >>> Building/Updating help pages for package 'RDBLib'
     Formats: text html latex example
  DBLib                             text    html    latex   example
  S4R                               text    html    latex
  SQLDataType                       text    html    latex   example
  callProc                          text    html    latex
  commit                            text    html    latex   example
  dbApply.DBLibResultSet            text    html    latex   example
  dbApply                           text    html    latex   example
  dbConnect                         text    html    latex   example
  dbExec                            text    html    latex   example
  dbExecStatement                   text    html    latex   example
  dbManager                         text    html    latex   example
  describe                          text    html    latex   example
  fetch                             text    html    latex   example
  getManager                        text    html    latex   example
  getNumRows                        text    html    latex   example
  getTable                          text    html    latex   example
  isIdCurrent                       text    html    latex   example
  isSQLKeyword                      text    html    latex   example
  load                              text    html    latex   example
  make.SQL.names                    text    html    latex   example
  metaData                          text    html    latex   example
  methods.DBLib                     text    html    latex   example
  quickSQL                          text    html    latex   example
  setDataMappings                   text    html    latex   example
  supportObjects                    text    html    latex
* DONE (RDBLib)
lt14008:/opt/R-1.9.1/bin # ./R

R : Copyright 2004, The R Foundation for Statistical Computing
Version 1.9.1  (2004-06-21), ISBN 3-900051-00-3

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.

WARNING: UTF-8 locales are not currently supported

> library(RDBLib)
Error in dyn.load(x, as.logical(local), as.logical(now)) :
        unable to load shared library
"/opt/R-1.9.1/lib/R/library/RDBLib/libs/RDBLib.so":
  libsybdb.so.4: cannot open shared object file: No such file or directory
Error in library(RDBLib) : .First.lib failed
> q()
Save workspace image? [y/n/c]: n
lt14008:/opt/R-1.9.1/bin # export
LD_LIBRARY_PATH=:/opt/freetds-0.62.4/lib:$LD_LIBRARY_PATH
lt14008:/opt/R-1.9.1/bin # ./R

R : Copyright 2004, The R Foundation for Statistical Computing
Version 1.9.1  (2004-06-21), ISBN 3-900051-00-3

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.

WARNING: UTF-8 locales are not currently supported

> library(RDBLib)
> m2 <- DBLib()
> dblib <- dbConnect(m2, server="servername", dbname="dbname",
user="username", passwd="password")
> Param <- "someparam"
> sqlstr <- paste("SELECT * FROM sometable WHERE (Parameter =
'",Param,"')", sep="")
> rs <- dbExecStatement( dblib, sqlstr )
> scale <- fetch(rs, n=-1)
> scale
...
>




lt14008:/opt/R-2.0.0/bin # ./R CMD INSTALL
--configure-args='--with-freetds-dir=/opt/freetds-0.62.4/'
/usr/src/tgz/RDBLib_0.1-2.tar.gz
* Installing *source* package 'RDBLib' ...
creating cache ./config.cache
checking how to run the C preprocessor... cc -E
checking for dbinit in -lsybdb... no
checking for tds_configs.h... no
updating cache ./config.cache
creating ./config.status
creating src/Makevars
Error: Invalid DESCRIPTION file

Malformed maintainer field.

See the information on DESCRIPTION files in section 'Creating R
packages' of the 'Writing R Extensions' manual.
Execution halted
ERROR: installing package DESCRIPTION failed
lt14008:/opt/R-2.0.0/bin #
----------------------- /LOG -----------------------




More information about the R-sig-DB mailing list