Db2 (On Premises and Cloud)

 View Only
  • 1.  Connect from .NET6

    Posted 10 days ago
    Edited by Björn Holmgren 8 days ago
    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 8 days ago
    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 4 days ago
    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. 

    Cheers

    ------------------------------
    Björn Holmgren
    ------------------------------