Where to get the iSeries ADO.NET data provider
The iSeries .NET data provider is the native data provider that allows you to access iSeries data and programs using .NET in a managed way.
This is a .dll (IBM.Data.DB2.iSeries.dll ) that you add in as a reference when creating .Net apps to connect to the iSeries
Once added in you have access to all the classes and methods that simplify writing applications in .Net to leverage iSeries data in the db2 database
The dll is part of iSerices Access for windows which you can download for free (when you select the technology preview). Make sure you check 'Selective Setup' and include the Data and Programmer's toolkit so you get all the data access drivers, help and tools.
- Download iSeries Access from http://www-03.ibm.com/systems/i/software/access/windows/downloads.html
Select the technology preview version. You'll have do the register rigmarole.
If the link doesn't work, google 'iSeries Access windows' to find the latest location. - Install iSeries Access making sure that you select 'custom install' to include the programmers toolkit (it comes in handy as it has examples etc.) . Once you have installed iSeries Access you will find the dll in C:\Program Files\IBM\Client Access\IBM.Data.DB2.iSeries.dll
- In Visual Studio, open up your project. Click on the Solution Explorer, then references. Right click references and select 'Add Reference'. A dialog box appears. Click 'Browse'. Add in the dll from the location above.
- Add the namespace '
using IBM.Data.DB2.iSeries;' to your code - Start using the iSeries classes! The iDB2Command is what you use to run queries, IDB2Connection to create a connection string to your iSeries db, iDB2DataAdapter gives you a cache to both connect, retrieve and update a set of data.
With the native .NET provider you have support for:
- SQL (INSERT, UPDATE, DELETE, SELECT)
- Stored procedure support
- Commitment control
- Connection pooling
- SQL naming,Unicode, Threads and multiple databases (IASPs)
To call iSeries programs use a stored procedure.
Labels: .net, .net data provider, C#, db2, iseries, iseries access, iSeries Access for Windows


2 Comments:
Good stuff, Colm. I've been using the iSeries .NET provider for a while, now I need to use it to call an iSeries procedure... haven't had luck yet.
What problems are you having with calling a procedure?
Do you mean a stored procedure or an RPG procedure?
C
Post a Comment
<< Home