Dot Net Fluke: Getting by on C# for iSeries RPG Developers

Useful tutorials on C# and .NET for RPG iSeries AS/400 developers. Brought to you from the folks at AranRock Consulting

1/13/08

Different ways to access iSeries data

Remember, you have 4 main methods to access DB2 for iSeries from .NET programs:
  1. The ADO.NET managed provider for iSeries Access for Windows, IBM.Data.DB2.iSeries.
    and....
  2. ODBC: The Microsoft-supplied ODBC bridge provider using the iSeries Access forWindows ODBC driver for underlying database connectivity. Microsoft.Data.Odbc
  3. OLE DB: The Microsoft-supplied OLEDB bridge provider using one of the iSeries Accessfor Windows OLE DB providers for underlying database connectivity. System.Data.OleDb This is an unmanaged method.
  4. The DB2 for Linux, UNIX, and Windows (LUW) managed provider implemented by IBM software group. 
Managed vs. Unmanaged

The managed provider is superior in terms of controlling actions to the DB from within your application. Managed means managed by .net - the drivers to access the iSeries are compiled into a .Net assembly. Unmanaged means that it is outside the .Net assembly - an .exe for example.
When you use OLE DB you are using an unmanaged provider so there is an extra step that has to occur from .net to the iSeries such as a bridge between the two. You should experience better performance when using the .Net managed provider.

Here's an overview of the IBM .net managed provider (from IBM)

I highly recommend reading the IBM redbook ' Integrating DB2 Universal Database for iSeries with Microsoft ADO .NET' from which the above is summarized. 'You can download it at http://www.redbooks.ibm.com/abstracts/sg246440.html

Labels: , , , ,

0 Comments:

Post a Comment

<< Home