[R-sig-DB] Sybase anyone?
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Wed Sep 10 18:29:20 CEST 2003
On Wed, Sep 10, 2003 at 09:24:32AM -0500, Dirk Eddelbuettel wrote:
> 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.
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
--
Those are my principles, and if you don't like them... well, I have others.
-- Groucho Marx
More information about the R-sig-DB
mailing list