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

标题: [解决] DataReader.GetFieldType(7) returned null [打印本页]

作者: 资讯王    时间: 2018-3-8 17:44
标题: [解决] DataReader.GetFieldType(7) returned null
[解决] 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




欢迎光临 大马资讯论坛 - 马来西亚中文资讯平台 (http://freeinfo.com.my/) Powered by Discuz! X3.3