.Net Connector for SAP HANA with .Net Core

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 17:25:27

问题


We are creating a web api for our organization. API connects and retrieves data from a HANA View. I am referring the sample provided at the below link to establish the connectivity

https://blogs.sap.com/2015/04/15/creating-a-c-application-using-sap-hana-and-adonet/

Since .Net Core does not allow DLL to be referenced directly, we are creating a local nuget package and referencing the same (https://docs.nuget.org/ndocs/create-packages/creating-a-package)

I get the below error when I initialize HanaConection:

{"Version mismatch: C:\Windows\assembly\GAC_MSIL\Sap.Data.Hana.v3.5\1.0.120.0__0326b8ea63db4bc4\Sap.Data.Hana.v3.5.dll (1.0.120.0), C:\Program Files\sap\hdbclient\libSQLDBCHDB.dll (1.00.112.00.1457615240).":"C:\Program Files\sap\hdbclient\libSQLDBCHDB.dll"}


回答1:


Looks like your assembly expects a HANA rev. 120 driver, while a rev. 112 driver is actually installed.




回答2:


We had created the local nuget Package using x86 version of SAP .Net connector, our app was running on 64bit mode. Hence it was failing. I recreated the package using 64bit version of dll and the problem got resolved.



来源:https://stackoverflow.com/questions/41498542/net-connector-for-sap-hana-with-net-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!