AS400 IBM.Data.DB2.iSeries .NET Provider

Hi,
I've installed IBM Client Access V5M3 with the .NET Data Provider.

In C# I add a reference to the "IBM DB2 UDB for iSeries .NET Provider" for using the data provider. All work fine, I can create the iDB2Connection and other iDB2 object. But using VS2005 and the
DbProviderFactories class, the GetFactory method fail with the message "Unable to find the requested .Net Framework Data Provider.  It may not be installed.". But the provider is installed because I can use it, except with the DbProviderFactories class. If I call the DbProviderFactories.GetClasses() method the returned provider are:

Odbc Data Provider
OleDb Data Provider
OracleClient Data Provider
SqlClient Data Provider
SQL Server CE Data Provider

and I don't see the IBM data provider. Why this I need to do something "register" the provider



Answer this question

AS400 IBM.Data.DB2.iSeries .NET Provider

  • Zakary

    Hello you must register this provider in app.config or web.config.

    Something like this. I am not familar with this provider so please correct me.

    <system.data>
        <DbProviderFactories>
          <add name="IBM DB2 UDB for iSeries .NET Provider" invariant="IBM.Data.DB2.iSeries" description=".Net Framework Data Provider for IBM DB2 UDB for iSeries" type="IBM.Data.DB2.iSeries.DB2Factory" />
        </DbProviderFactories>
      </system.data>

    Please note that I am not even see this provider. Please check type attribute. You must supply type string of the factory class of this provider. Also this is possible that this provider does not support factories. In this scenario you will need implement this by your self. Is short words you will need implement class inherited from DbProviderFactory.

  • Kade

    I have SQL Server 2005 as my DB. In addition to this, I need to connect to DB2/400. Do you have any resources for me to get started

  • ZhangQing

    If you need to connect to AS400 you must install an as400 oledb or odbc provider like IBM Client Access or Hit Software.

    After install a provider you must set the connectionstring of the connection object. The data source property is the name or IP address of AS400.

    bye



  • Marcin Obel

    Is same is true for DB2 for Z/OS

    Thanks!

  • AS400 IBM.Data.DB2.iSeries .NET Provider