7

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"}

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
IamChandu
  • 355
  • 6
  • 18
  • SAP have added support for .net core from HANA 2.0 SPS4. See SAP Note 2499500 or here: https://help.sap.com/viewer/0eec0d68141541d1b07893a39944924e/2.0.04/en-US/bd3548f9c00845849fe4d883148974d1.html – Daz May 16 '19 at 11:35

2 Answers2

2

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

Lars Br.
  • 9,949
  • 2
  • 15
  • 29
1

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.

IamChandu
  • 355
  • 6
  • 18