Chapter 4. Deploying applications with DB2 209
Prerequisites
Before you can access DB2 from your .NET application, these prerequisites
must be in place:
򐂰.NET Framework Version 2.0 or higher
At the time of writing this booki, the latest version of the .NET Framework is
3.5. Usually, you should download and use the latest version.
򐂰IBM Data Server Driver
If either IBM Data Server Client or IBM Data Server Runtime Client is
presented, installing IBM Data Server Drive is not required. Otherwise, we
require IBM Data Server Driver for ODBC, CLI, and .NET
Installation procedure
First of all, ensure that the .NET Framework is installed on your Windows
environment. You can check this by opening the “Add or Remove Programs”
dialog from the Windows Control Center. If installed, the framework will be listed
in the program list. If the framework is not presented, download the msi-install file
for .NET Framework version 3.5 from the Microsoft Download Center:
http://www.microsoft.com/downloads/details.aspx?FamilyID=333325fd-ae52-4e35-b53
1-508d977d32a6&DisplayLang=en
Next, install the IBM Data Server Driver as described in 4.1.2, “IBM Data Server
Driver for ODBC, CLI, and .NET, and IBM Data Server Driver for ODBC and CLI”
on page 143.
Deployment procedure for a .NET application
We assume that the .NET framework is already installed on the target system,
that is, we do not cover this topic in this deployment example. We concentrate on
the deployment of the application, IBM Data Server Driver for ODBC, CLI, and
the .NET. However, if installing the .NET framework is required, this step can
easily be added to the install script, using a silent install of the msi installation file
for the framework.
Remark: For those familiar with Java and J2EE, there are a lot of similarities
between the J2EE and .NET. The execution environment in J2EE is the Java
Virtual Machine, which correspond to the Common Language Runtime in
.NET. The .NET specifications correspond to the J2EE specifications. .NET
supports a large variety of programming languages, but C# (pronounced
C-sharp) is considered to be the pendant of Java in the .NET framework.
Note: DB2 supports also the old .NET Framework version 1.1. However, it is
not recommended to use this old version.