using System.Data.Odbc;----> It will be referring to Open database Connectivity (common across all database )
using System.Data.Oledb;----->It will be referring to Object Linking and Embedding, Database
using Oracle.DataAccess.Client;----->It is provided my Microsoft for Oracle
using Oracle.DataAccess.Types;-------> .NET DataProvider from Oracle ------------------>is this a ODP connection?
what is the significant difference in these commands ODBC ,OLEDB and ODP
Which will performance better in Oracle.
Thanks!
Satyapriya NayakPosted Sep 20, 2012, 6:59 AM
OLEDB was designed for accessing generic databases, ODP is native Oracle provider which should have better performance and allows to use specific Oracle features.
using Oracle.DataAccess.Client;
OracleConnection conn = new OracleConnection();
conn.ConnectionString =
"Data Source=Servername;" +
"Integrated Security=Yes;";
conn.Open();
ODBC stands for Open Data Base Connectivity, which is a connection method to data sources.
When connecting a tool or application to a database, a data source, also called a Database Source Name (DSN), using an SQL driver or other driver if connecting to other database type, needs to be set up. Then, the application is connected to the database using this DSN.
DSN is a data structure used to describe a connection to a database. A DSN will take the form of a protocol: subprotocol: host: port:. Those are the parameters required to completely specify the connection. The exact format of the DSN will vary depending on your programming language.
ODBC is the method of connectivity that encompases the DNS. Most database systems support ODBC.
OLEDB
OLEDB stands for Object Linking and Embedding Database. It is an application programming interface designed by Microsoft for accessing different types of data stores in a uniform manner.
It is a newer and improved successor to ODBC.
OLEDB is the successor to ODBC, a set of software components that allow a "front end interface" such as a graphical user interface (GUI) based on VB, C++, Access, and others to connect with a back end such as SQL Server, Oracle, DB2, mySQL, etc.
OLEDB components in many cases offer improved performance over the older ODBC.
OLEDB is a different type of data provider that came about with MS's Universal Data Access in 1996.
OLEDB does not require a DSN.
Please refer the below links
http://www.sqlmag.com/article/odbc/ole-db-or-odbc-
http://www.dofactory.com/Connect/Connect.aspx#_self392
http://www.c-sharpcorner.com/UploadFile/nipuntomar/connection-strings-for-oracle/
http://jamesmccaffrey.wordpress.com/2006/05/02/odbc-vs-ole-db/
http://www.dotnetspider.com/forum/23743-difference-between-OLEDB-ODBC-concepts.aspx
Thanks
If this post helps you mark it as answer