Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference in adodb and oledb?

What is the difference between adodb and oledb?

What is the relation between these two?

Where does ado.net stands in context of adodb and oledb?

like image 217
TheVillageIdiot Avatar asked Sep 22 '10 05:09

TheVillageIdiot


People also ask

What is difference between OLE DB and ODBC?

OLEDB is a Windows-only database API. It uses the Component Object Model (COM), which is unavailable on other platforms. Meanwhile, ODBC is supported on Windows, Linux, Mac, and UNIX. But both support 32-bit and 64-bit architectures.

What is the difference between ADO.NET source and OLE DB source in SSIS?

First of all, it is good to know that ADO.NET used OLE DB providers to access data while OLE DB uses ODBC to access relational databases. After giving an overview of these three SSIS connection managers, I will try to illustrate some of the differences between them from an SSIS development perspective.

What are the differences between OLE DB and SQLClient providers?

OLEDB is much faster than the SQLClient, EXCEPT when it is access through ADO.NET. The drivers for OLEDB are written in native unmanaged code however, when you access these drivers through ADO.NET, you have to go through several layers (including an abstraction layer and a COM interop layer).

What is a ADOdb connection?

The ADO Connection Object is used to create an open connection to a data source. Through this connection, you can access and manipulate a database. If you want to access a database multiple times, you should establish a connection using the Connection object.


1 Answers

Adodb (ActiveX Data Objects DB) is an API layer over OLE DB. It works well with MS-based databases such as Sql Server, providing a consistent API and optimizations. That being said you can use ADODB to connect with non-MS data sources as well but that would mean that you will require an OLEDB/ODBC Provider for the data source.

In simpler terms, to connect to any data source you need a driver. Here are a couple of common scenarios to think of:

  1. ADODB for Data Source that has ODBC Driver Only - ADODB uses OLEDB Provider for ODBC which loads ODBC Driver which then connects to Data Source.
  2. ADODB for Data Source with OLEDB Driver (like SQL Server) - ADODB uses OLEDB Provider for SQL Server to talk directly with DB.

Oledb (Object Linking and Embedding DB) is a standard format supported by a large number of dbs, so you can connect to oracle, db2 etc. using Oledb. You can also use OLEDB directly to connect to Sql Server but the API is messier as compared to a adodb connection which is optimized to work with Sql Server and MS Access.

ADO.Net is a .Net based db connection "architecture". In ADO.Net there's a library for Oledb - System.Data.OledbClient. Adodb has been replaced/upgraded and ADO.Net now uses the System.Data.SqlClient library for MS-based databases/data providers.

like image 143
Sidharth Panwar Avatar answered Sep 19 '22 18:09

Sidharth Panwar