Db2 On Premise and Cloud

 View Only
  • 1.  Connect from .NET6

    Posted Tue June 21, 2022 09:26 AM
    Edited by Björn Holmgren Thu June 23, 2022 03:07 AM
    We have a customer with a Db2 based business system. and we want to develop a .NET 6 application for them, and connect to the Db2 database. I have never worked with IBM Db2 before, and need some help. I have tried installed the IBM NuGet Db2.core, for .NET 6 but it throws errors when I try connect, it throws on the Open command even. So...

    Question: Exactly how do I connect to Db2 from .NET6?

    Björn Holmgren

  • 2.  RE: Connect from .NET6

    Posted Thu June 23, 2022 12:12 PM
    Hi, Holmgren

    You can use the Db2 .NET provider for Entity Framework Core to develop .NET applications that use the .NET Core Entity Framework to connect to IBM database servers.
    The IBM Data Server Provider for .NET is a name that is used to describe the .NET providers that are packaged with the IBM data server clients products. There are two .NET providers included in the IBM data server clients or IBM Data Server Driver Package. The two .NET providers are also called the Common .NET Providers, packaged with the IBM data server clients products.
    If you continue encounter errors when connecting to Db2, pls try to ask your customer to open Db2 support case to provide further advice.

    Su Li Hou

  • 3.  RE: Connect from .NET6

    Posted Mon June 27, 2022 04:33 AM
    Thanks for the well written response!

    I will try out the: "Net.IBM.Data.Db2", seems to be for .NET6. I missed that nuget package. 


    Björn Holmgren