DB2 9.0 + provides ADO. NET Provider (1) that supports. NET 2.0)

Source: Internet
Author: User

This article introduces the ADO. NET Provider and ADO. NET Provider provided by DB2 9.0 + to support. NET 2.0. If you are interested in this, please take a look at it and it will help you.

Although many of my friends are using. NET for data access, there should be few DB2 users. Occasionally, ODBC or ole db is used.

DB2 9.0 + provides ADO. NET Provider that supports. NET 2.0. Especially for friends who use PureXML to develop XQuery, this function is richer than ole db and ODBC.

I installed DB2 9.5 Express-C.
The development environment is VS 2008, but it is more convenient to use the DB 2005 Visual Studio 9.5 Add-ins of VS 2005.
Code-based access will not be mentioned. Here we will introduce a method of App. Config, Which is google. We cannot find a suitable method. We accidentally hit it and found providerName = "IBM. Data. DB2 ")

Using System;
Using System. Collections. Generic;
Using System. Linq;
Using System. Text;
Using System. Data;
Using System. Diagnostics;
Using System. Data. Common;
Using System. Configuration;
Namespace MarvellousXml. Library. Data
{
/// <Summary>
/// Abstract base class for completing data operations
/// </Summary>
Public class Database
{
Protected string name;
ConnectionStringSettings setting;

Public Database (string name)
{
This. name = name;
This. setting = ConfigurationManager. ConnectionStrings [name];


Related Article

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.