大马资讯论坛 - 马来西亚中文资讯平台

 找回密码
 注册
搜索
打印 上一主题 下一主题

[解决] DataReader.GetFieldType(7) returned null

[复制链接]
跳转到指定楼层
1#
发表于 2018-3-8 17:44:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
[解决] DataReader.GetFieldType(7) returned null

1. Add reference
C:\Program Files (x86)\Microsoft SQL Server\110\Shared\Microsoft.SqlServer.Types.dll
OR
C:\Program Files\Microsoft SQL Server\110\Shared\Microsoft.SqlServer.Types.dll



2. Add to config file

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
    ...  
      <dependentAssembly>  
        <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />  
        <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />  
      </dependentAssembly>  
    ...  
    </assemblyBinding>  
  </runtime>
</configuration>

来源
https://msdn.microsoft.com/en-us/library/dn236441(v=sql.120).aspx

手机版|大马资讯论坛  

GMT+8, 2024-4-27 00:47 , Processed in 0.015647 second(s), 13 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表