VS detailed development with DB2 as the background database (1)

Source: Internet
Author: User
Tags db2 client db2 driver ibm db2

This article introduces you to the development instance of the background database using DB2 in Visual Studio. NET and detailed steps for your reference.

In Studio. NET Beta 1, accessing non-SQL Server databases such as IBM DB2 is usually using the ODBC method of ADO. NET, while in Beta 2, OLE DB is used to access the database.

The connection string in Beta1 mainly needs to declare the odbc dns name of the database, but the ole db connection string in Beta 2 is complicated and the classes used are also different. Because DB2 and other databases are widely used in mainframe and other applications,. NET will naturally fully support such programming. For this reason, the DB2 development of ole db will be described below.

Ole db for DB2 driver

First, Visual Studio. NET and Windows 2000 Server do not directly provide the DB2 ole db driver. Therefore, you need to download the Microsoft Host Integration Server 2000 software, which contains ole db Provider and ODBC driver for DB2, you need to download the Server software package and select to install Data Integration during installation. After the installation is complete, you can use its ole db DB2 driver.

Set database connection

First, we need to configure the DB2 client settings, open the server resource manager in the View menu item, and add a new connection to its data connection, when specifying program options, select Microsoft ole db Provider for DB2. In the next connection options, enter the following information:

Data Source: QCDB can be modified as appropriate)
Network: TCP/IP
IP Address: Address of the Database Server
Network Port: DB2 service Port
Username: User Name for Database Access Permissions
Password: the user's Password.
Database initial Catalog: QCDB
Package collection: QCDB
Default schema: Userid

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.