Reputation: 699
I am trying to connect to an Informix database and need to add this reference to my project: using IBM.Data.Informix;
What package in package manager console do I need to be able to use this library? Thanks in advance!
Upvotes: 2
Views: 3526
Reputation: 2013
To connect to an Informix database from .NET you have to options:
Have a look at this tech note which describes both .NET provider:
https://www.ibm.com/developerworks/data/library/techarticle/dm-1007dsnetids/
Both will work with Informix. The first one is the 'native' .NET provider included with CSDK (CSDK or ClientSDK is the product that includes all the Informix drivers (ODBC/OLEDB/.NET) etc.
At the moment the only way to get the drivers installed is with a stand alone package (Informix CSDK). There are some plans to get them in NuGet, so you would be able to get the drivers directly from the Visual Studio package manager without anything to install.
The second option, 'IBM Data Server .Net Provider' is included in the 'IBM Data Server' which is an 'common' set of drivers from IBM. It will allow you to connect to either DB2 or Informix (through a DRDA connection)
You can get the IBM Data Server Driver Package from the IBM website, or download the .NET drivers (and required libraries) directly from NuGet:
https://www.nuget.org/packages/IBM.Data.DB.Provider/
PM> Install-Package IBM.Data.DB.Provider
The .NET assembly class is called 'IBM.Data.DB2.dll' There used to be a 'replacement' dll named the same as the Informix CSDK one (IBM.Data.Informix.dll) but is now deprecated. Even with that name ;) it is fully supported against Informix databases. There are some differences between the .NET providers (e.g. connection string) so if you are going to use the 'DB2' one, I suggest to check the documentation at:
There is also a new beta .NET provider for the new '.NET Core' supporting both Windows and Linux platforms. If you are going to develop for .NET Core, this is the one you want
https://www.nuget.org/packages/IBM.Data.DB2.Core/1.0.0.100
PM> Install-Package IBM.Data.DB2.Core
Upvotes: 4