Search code examples
c#.netibm-midrangedb2-400db2-connect

AS / 400 connection method


I have to create architecture and procedures to connect Visual Studio c# programs with the database on the IBM AS/400. I'm looking for different possibilities, I think that services Rest is the best choice but I have not yet decided how to connect them with the AS / 400. Does anyone have experience about this? Could Entity Framework be a valid option? What about IBM.Data.DB2.iSeries data provider? I've to do "simple" CRUD operation, i'm in a local network without permission problems or users limitations.


Solution

  • From my experience, you need to install the ODBC drivers of the AS/400 in order to be able to establish a connection between the application and the database. I have not tried to use Entity Framework with an ODBC driver, but this link says that Entity Framework does not support ODBC connections. Your option here is to use the OdbcClient classes offered in .NET, in order to establish the connection between your application and the AS/400 database.