Skip to content
Prev 91 / 1559 Next

Sybase anyone?

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