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. This is probably your best bet for iSeries data connectivity. Get info on it here
    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: , , , ,

3 Comments:

At July 6, 2009 at 12:17 PM , Blogger Unknown said...

Nice series of articles you've been working on. Let's see if you can help with a question...I'm trying to add a new DataSet to web site in VS2005 but all the iDB2 tools in the toolbox are grayed out...the only time I can actually see/use the tools is if I try to design a Windows Form as opposed to a Web Site. Any thoughts?

 
At January 11, 2010 at 10:44 AM , Anonymous Anonymous said...

dataqueues NOT supported.

 
At January 11, 2010 at 10:46 AM , Anonymous Anonymous said...

dataqueues NOT supported.

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home