[R] RODBC, freetds, and MS SQL Server

About this list Date view Thread view Subject view Author view Attachment view

From: Andrew Schuh (andys@neptuneinc.org)
Date: Tue 01 Apr 2003 - 10:12:35 EST


Message-id: <200303311712.35962.andys@neptuneinc.org>

I have a question for RODBC users out there. I have used the package with
good results for some time. However, I have just switched from an OpenLink
proprietary driver for MS SQL to the FreeTDS driver (I think it is MS SQL
Server 2000 I'm connecting to if it matters). I was/am running them from
unixODBC on a Linux Client. I think I have it set up fine since I can use
"isql" to perform simple queries on the database. However, I get really odd
behavior when I try to use it through RODBC. It seems to connect fine but
gives back odd results. The database I'm accessing is called "cmp" and there
are many tables of which one is called "Medium". In the past "select * from
cmp.Medium" has returned the whole table to me but now it only seems like I
get column headers. Any help or advice would be appreciated.

##-------------------------------------------------------------------------------##
> library(RODBC)
> con <- odbcConnect("BIGSKY","***","**********")
> con
RODB Connection 0
Details:
  case=nochange
  0Ҩ
> sqlTables(con)
[1] TABLE_QUALIFIER TABLE_OWNER TABLE_NAME TABLE_TYPE
[5] REMARKS
<0 rows> (or 0-length row.names)
> sqlQuery(con,"select * from Medium")
[1] "[RODBC] ERROR: Could not SQLExecute"
[2] "S1000 1 [unixODBC] Msg 208, Level 16, State 1, Server BIGSKY, Line
1\nInvalid object name 'Medium'.\n"
> sqlQuery(con,"select * from cmp.Medium")
[1] MediumKey Medium IsSpecies
<0 rows> (or 0-length row.names)
> version
         _
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status
major 1
minor 6.2
year 2003
month 01
day 10
language R
>

Also, I'm using the latest RODBC I got from CRAN yesterday.

-- 
Sincerely,

+++++++++++*******+++++***++* Andrew Schuh Environmental Mathematician Neptune and Co. (970) 223-7265 andys@neptuneinc.org +++++++++++*******+++++***++*

______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:35 EST