Tutorial introduction
This tutorial demonstrates how to combine a Visual Basic .NET Web service with a Web based Java application to access data in a DB2 database.
In this tutorial, you'll learn the following:
- How to create database objects and stored procedures using the DB2 Development Add-in
- How to create a Web service in Visual Basic .NET
- How to register a Web service with a UDDI server
- How to build a simple application in Java that accesses the Web service
The sample application in this tutorial revolves around a Web service that tracks frequent-flyer mileage for JustPC.com Airlines. The data is stored in a DB2 database, which is accessed from a Visual Basic .NET Web service using the DB2 managed provider. A Java-based Web program accesses the Web service to verify that a particular customer is enrolled in the frequent flyer program and also to credit and debit mileage.
Microsoft Visual Studio .NET with the DB2 Development Add-in is used to create the DB2 database objects, as well as to create the Visual Basic .NET Web service. IBM WebSphere Studio Application Developer is used to create a Web Project that accesses the Web service.
You should take this tutorial if:
- You are familiar with DB2 and wish to learn about how to create a Visual Basic .NET Web service using the new DB2 managed provider.
- You are familiar with Visual Basic .NET and wish to see how to use the new IBM DB2 managed provider to access a DB2 database
- You are familiar with Visual Studio .NET and wish to learn how to use the DB2 Development Add-in to create DB2 database objects.
- You are curious to see how well a non-Microsoft database can be integrated into a .NET application.
- You are curious to see how Visual Basic .NET and Java can co-exist in a single application.
This tutorial relies on software from both IBM and Microsoft.
- IBM DB2, Version 8.1 provides the database facilities used by this tutorial. You can download an evaluation copy of DB2 from: http://www6.software.ibm.com/dl/db2udbdl/db2udbdl-p.
- IBM WebSphere Application Developer is used to create the Java Web program. You can download an evaluation copy from here.
- Microsoft Visual Studio .NET (http://msdn.microsoft.com/vstudio/) provides the development environment used to build the Visual Basic .NET Web service.
- Microsoft Windows 2000 Server (http://www.microsoft.com/windows2000/server/) provides the operating system to host DB2, plus the tools to run the Web service and the C# ASP.NET application. Note that you can also use Windows 2000 Advanced Server, Windows 2003 Server, or Windows 2003 Advanced Server.
- A separate C compiler to compile the stored procedures must also be available on the same machine as the database server. You should refer to the DB2 installation documentation for more details.
Note: While this tutorial was created and tested on a single Windows 2000 Server system, you may choose to run Visual Studio .NET on a Windows 2000 or XP Professional system and copy the appropriate files to the Windows Server system for execution.
You can also download all of the files in ZIP format (52 KB) for this tutorial.
Copyright, 2003 International Business Machines Corporation. All rights reserved.
IBM, DB2, DB2 Universal Database, and IBM WebSphere Application Developerare trademarks or registered trademarks of IBM Corporation in the United States, other countries, or both.
Microsoft, Windows, and Windows 2000 are registered trademarks of Microsoft Corporation in the United States, other countries, or both.
Other company, product, and service names may be trademarks or service marks of others.

