OleDbConnection SqlConnection db2connection Difference

Source: Internet
Author: User

OleDbConnection is suitable for connecting any type of database (such as Oracle,sql server,access, etc.) with the namespace: using System.Data.OleDb;. Instead, SqlConnection is designed to connect to a SQL Server (MS SQL) database with the namespace: using System.Data.SqlClient. In the operation of the database, if the use of OleDbConnection, then the operation of the database, such as connection pool will be used to OleDbDataAdapter and Operation command with OleDbCommand, the same in the use of SqlConnection, will use Sqldataadaper and Sqlccommand. In some cases, if you need to manipulate data in a data table specific to a field (for example, to get specific data for a column in a row), OleDbConnection can use Oledbdatareader,sqlconnection to SqlDataReader Reader for data read.  Second, for the above two cases, you can also use the connection pool, dataset, datetable of the combination of access to a row of their own to a particular column of specific data. For the above specific methods and properties of use can refer to the MSDN explanation!

Db2connection is dedicated to connecting to the DB2 database, through IBM-provided IBM.data.DB2.DLL, which requires the addition of references, location "assemblies", "Extensions", "IBM." Data.db2 "namespace is using IBM.  DATA.DB2; In the operation of the database, if the use of db2connection, then the operation of the database, such as connection pool will be used to Db2dataadapter and Operation command with Db2command.

Standard connection string required by DB2

OleDbConnection SqlConnection db2connection Difference

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.