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

Error - Potentially on NULL int fields. #33

Open jfontestad opened 7 years ago

jfontestad commented 7 years ago

I also have the following error:


Error in clrCall(sqlDataHelper, "Fetch", stride) : 
  Type:    System.ArgumentException
Message: Cannot widen from source type to target type either because the source type is a not a primitive type or the conversion cannot be accomplished.
Method:  Void InternalSetValue(Void*, System.Object)
Stack trace:
   at System.Array.InternalSetValue(Void* target, Object value)
   at System.Array.SetValue(Object value, Int32 index)
   at rsqlserver.net.SqlDataHelper.Fetch(Int32 capacity) in C:\Users\Ruaridh Williamson\Documents\GitHub\rsqlserver\src.nocompile\rsqlserver.net\src\SqlDataHelper.cs:line 171

Coming from fields of int data-type. but are NULL.

ruaridhw commented 7 years ago

Can you provide some context about what caused the error? Here is some documentation on producing reproducible examples that can help diagnose problems you're facing. If you can't provide a code chunk that reproduces the error we can't help!