agstudy / rsqlserver

Sql Server driver database interface (DBI) driver for R. This is a DBI-compliant Sql Server driver based on the System.Data.SqlClient.
82 stars 30 forks source link

can't read **bigint** or **bit** data types. #6

Closed agstudy closed 7 years ago

agstudy commented 10 years ago

I was wrong about that, I sorted through the columns in my query and the error I am getting happens when I have a column of bigint or bit data types.

Now I get this error:

Error in clrCall(res.Dict, "get_Item", Cnames[i]) : 
  clr_obj_ms_convert_to_SEXP: COM variant type code 8212 unsupported. Returning NULL

Here is the script:

drv <- dbDriver("SqlServer")
conn <- dbConnect(drv, url = url")
query <- "SELECT [name]
      ,[species]
      ,[sample_buffer]
      ,[volume_ul]
      ,[comment]
      ,[object_id]
      ,[tissue_type]
      ,[gender]
      ,[od_value]
      ,[concentration]
      ,[extraction_method]
      ,[ethnicity]
      ,[date_received]
  FROM [Sample]"

df1 <- dbGetQuery(conn, query)

Here is a link to a csv version of the DB: https://www.dropbox.com/s/7pdo8ojpbe119kc/testDB.csv But that probably won't help reproduce since it will be in a different format... Its very likely I just don't know what I'm doing.