Lots of people ask this question. Let me tell you what I know. You might
divide the data-access mechanisms into two categories - managed providers,
and everything else. Managed providers are providers specifically written
for .NEt. They potentially deliver better performance, but they are less
mature. Currently there are fully managed providers for Oracle and SQL
Server, but none shipping yet for DB2. In the second category is
"everything else" - meaning ADO.NET providers for OLEDB and ODBC.
There are at least 3 managed providers for DB2, currently under development:
----------------------
IBM
- I believe this is built on ODBC ( IBM utilized source code from the
Microsoft .NET Data Provider for ODBC (Microsoft C# source code) as a
reference implementation). The ODBC driver and the managed provider ship
with the DB2 Connect V8 product.
IBM has stated that they will offer their managed provider as a feature of
IBM DB2 Connect (probably in V8R2), and also DB2 UDB. If you are trying to
get to the mainframe, you want the former. DB2 Connect is available in a
number of licensing options: desktop only, server only (per server or per
processor), and enterprise-wide. I am not an IBM employee, so FWIW.
VS IDE integration is planned. This means you will be able to visually
explore the various DB2 resources, similar to what you can do with SQL
server today from within VS.
http://www7b.software.ibm.com/dmdd/downloads/dotnetbeta/
provider eval:
http://www6.software.ibm.com/dl/db2udbdl/db2udbdl-p
requires DB2 UDB v8.1 or DB2 Connect v8.1 (for mainframes, as400) or better.
----------------------
Microsoft
The DB2 managed provider is a feature of Host Integration Server 2004.
Written in C#, sits directly on top of the new Microsoft DRDA AR (DB2
network client) and does not go through an intermediary code layer (ODBC).
Result: better performance.
No Visual Studio integration is planned at this time.
HIS2004 is currently in private beta.
----------------------
DataDirect
http://www.ddtek.com/. I understand the db2 managed provider is under
development but have no further details.
----------------------
Mono
I have now heard that the mono project is building a managed provider for
DB2. I have no details on this.
----------------------
In addition, there are other ways to get to DB2, from within ADO.NET:
-The ODBC provider, of course, that ships with DB2 since v5? Use
System.Data.Odbc .
-The MS OLEDB provider (aka DB2OLEDB) that ships with HIS 2000. Use
System.Data.OleDb .
-The IBM OLEDB provider (aka IBMDADB2) bundled with DB2 since v6. Use to
DB2 v7.2 FP6 or later (current is FP9), you will get some improvements in
the data client. Use System.Data.OleDb .
All of these ways work, and work just fine.
If some of you are thinking, what about The OLEDB provider for ODBC (shipped
by MS), coupled with the ODBC driver for DB2 (from IBM)? This works from
VB6, or script, but you cannot use the OLEDB provider for ODBC, within .NET.
-Dino