Search code examples
db2entity-framework-6db2-connect

DB2 connectivity without client drivers


I'm using EF 6 (Code first) with the IBM.Data.DB2.EntityFramwork nuget package to access a db2 database server. Working locally it all works as expected, but when deployed to a test server I get an exception: "System.MissingMethodException: Method not found: 'Void IBM.Data.DB2.InternalStruct6.SetDefault()"

I'm no DB2 wizard but I think the issue is related to a incompatible version of the db2 client drivers installed on the test server (9.7?). Entity framework 6 support needs version > 10.5. (I must have installed the 10.5 version locally at some point).

It would be nice to be able to run the application on any pc without additional dependencies, so my question is: Are there any way of skipping the db2 clients/drivers installation, and rather reference certain db2 dll's (or other nuget packages), to access db2 db servers?


Solution

  • Ok, I think asking the question resulted in a moment of enlightenment. I guess the answer is NO, as the db2 clients/drivers actually installs the db2 odbc data source driver for db2. (Located in Administrative Tools -> Data Sources (ODBC)).

    enter image description here