DB2 .NET Data Provider

This .NET Framework Class Library is provided by IBM. The main functionality of the class library is contained in the file IBM.Data.DB2.dll.

Add a reference to the assembly IBM.Data.DB2 and include the IBM.Data.DB2 namespace. Instantiate a new DB2Connection connection object. Set the connection string and open the connection.

VB.NET code sample
Imports IBM.Data.DB2
Dim myConnection As DB2Connection = New DB2Connection()
myConnection.ConnectionString = myConnectionString
myConnection.Open()
' execute queries, etc
myConnection.Close()
C# code sample
using IBM.Data.DB2;
DB2Connection myConnection = new DB2Connection();
myConnection.ConnectionString = myConnectionString;
myConnection.Open();
// execute queries, etc
myConnection.Close();

Description

The DB2 .NET Data Provider extends DB2 support for the ADO.NET interface.

The DB2 .NET Data Provider allows your .NET applications to access the following database management systems:

DB2 Universal Database Version 8 for Windows, UNIX, and Linux-based computers

DB2 Universal Database Version 6 (or later) for OS/390 and z/OS, through DB2 Connect

DB2 Universal Database Version 5, Release 1 (or later) for AS/400 and iSeries, through DB2 Connect

DB2 Universal Database Version 7.3 (or later) for VSE & VM, through DB2 Connect

The DB2 .NET Data Provider is designed to be lightweight. It consists of a minimal layer between the database and your code. This extends functionality without sacrificing performance. When you use the DB2 .NET Data Provider, you do not need to enable connection pooling because the provider manages this automatically.

More info about this class library can be found at the IBM product page.

Download

There is no 'DB2 .NET Data Provider' installation package to download. (if you know about an installation package URL you can contribute to the community by submitting the info to us through this message form)

Connection Strings

The DB2 .NET Data Provider class library can be used to connect to the following data sources by using the following connection string references:

IBM DB2