Skip to content

Sybase anyone?

3 messages · Dirk Eddelbuettel, Detlef Steuer

#
Sig-DBers,

We're currently trying to figure how to let R (on Solaris) talk to ybase (on
Solaris).  As there is (AFAIK) no R DBI interface package for Sybase, we
tried RODBC with unixODBC and FreeTDS. We got halfway there -- we connect
and get table info, but no actual content.

We now have two choices: debug the both the FreeTDS and the unixODBC layer,
or start fresh against CTlib.  

Has anybody here tried either?  Or is there a fundamental reason I am
missing about why R doesn't play with Sybase?

Thanks for any and all pointers,  Dirk
#
That seems familiar ...
My way was to build a communication pipeline using Perl::DBI.
A bit ugly, but did what it should do.

Cu
detlef

  
    
#
On Wed, Sep 10, 2003 at 09:24:32AM -0500, Dirk Eddelbuettel wrote:
As so often, we figured it out just after I sent this. The key is that in

     odbcConnect(dsn, uid = "", pwd = "", case = "nochange",
                      believeNRows = TRUE)

believeNRows needs to be set to FALSE, and you're in business. That's all.

For the record, and in case somebody else will retrace the same steps, here
is what we did on Solaris 8 with current versions of R, RODBC, FreeTDS and
unixODBC:

i)   unixODBC-2.2.6 
     ./configure --prefix=/usr/local/unixODBC-2.2.6 \
     --x-libraries=/usr/openwin/lib --x-includes=/usr/openwin/include


ii)  freetds-0.61
     ./configure --prefix=/usr/local/freetds-0.61 --with-tdsver=4.2 \
     --with-unixodbc=/usr/local/unixODBC-2.2.6

iii) freetds.conf file

     [FOO]
        host = xxx.xxx.xxx.xxx
        port = 2510
        tds version = 4.2
        database = FooDB

iv)  odbc.ini

     [FOODSN]
     Driver = /usr/local/freetds-0.61/lib/libtdsodbc.so
     #the below line is a valid name in freetds.conf
     Servername = FOO
     Server = xxx.xxx.xxx.xxx
     Port = 2510
     TDS_Version = 4.2
     Database = FooDB

     [Default]
     Driver          = /usr/local/freetds-0.61/lib/libtdsodbc.so

v)   odbcinst.ini

     [SYBASE]
     Driver             = /usr/local/freetds-0.61/lib/libtdsodbc.so
     Description        = TDS Sybase Driver
     FileUsage          = 1

     [Default]
     Driver          = /usr/local/freetds-0.61/lib/libtdsodbc.so



Hth, Dirk