Build applications and Web sites for DB2 with VS2005

Source: Internet
Author: User
Tags building windows db2 ibm database visual studio

In this article, we describe building Windows applications and Web sites for DB2 with IBM tooling for Visual Studio 2005. This article describes how to build such applications and Web sites in accordance with the latest simple paradigm introduced in Visual Studio 2005.

Prerequisite conditions

Before you start building your applications and Web sites, make sure that you have performed the following steps:

Download and install IBM Database add-ins for Visual Studio 2005. For download and installation instructions, please visit the DeveloperWorks information Management Visual Studio. NET zone.

Create the DB2 UDB sample database.

Using Visual Studio 2005 can greatly simplify the task of building a Windows application without having to write any code. The functionality of the default generated application depends on the definition of the table being used. You can use the Microsoft Wizard to create a data source or use a drag-and-drop tool to build a Windows application.

Building Windows applications for departmental tables with the Microsoft Wizard

To use the Microsoft Wizard to create a Windows application for a single department table, follow these steps:

Create a new Windows application using the File > New > Project menu. The application is called Departmentapp. In this article, we will create a C # application.

Figure 1. To create a new C # Windows application

Note: You can also create an vb.net application by following the steps in this article.

In Microsoft Server Explorer, add a connection to the DB2 sample database.

Enter the server name, database name ("Sample"), user name, and password.

Select the option "Save my password".

Expand the Specify Filtering Options section, and then specify the filter for Tables as DEP. Note that filters follow similar search patterns and are case-sensitive.

Add this filter to retrieve all tables that start with "DEP." Note that adding this filter is optional for application development, but if you have a large number of tables in your database, it is recommended that you add filters to achieve better design-time performance.

Optionally, click Test Connection. Click OK. A connection to the sample database will be added in Microsoft Server Explorer.

Figure 2. Connection added to the DB2 sample database

Create a data source for the Department table.

Use the top-level menu data > Add New data Source to invoke the wizard.

Figure 3. Add a new Data Source wizard

In the wizard, leave the default selection "Database". Click Next.

From the list of connections, select the sample database connection that you created earlier. Select the option to include sensitive data in the connection string. Click Next.

Figure 4. Select Database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.