MSDASQL - OLEDB Provider for ODBC drivers

As mentioned before, a provider is needed for any data source that is to be exposed through OLE DB. Microsoft releases providers for several common data sources, including SQL Server, Oracle, and Jet. In addition, Microsoft ships a special provider called the “OLE DB Provider for ODBC Drivers”. This was the very first OLE DB provider ever released, and is also known as “MSDASQL”, due to the fact that it is contained in “MSDASQL.DLL”.

MSDASQL allows OLE DB consumer applications to utilize ODBC drivers to connect to a data source. The provider converts incoming OLE DB calls into ODBC calls, and passes them on to the specified ODBC driver. It then retrieves results from the ODBC driver and formats those into OLE DB specific structures which the consumer then has access to.

The following diagram shows the flow of connecting to a SQL Server database through the MSDASQL provider and SQL Server ODBC driver.

clip_image001

OLE DB Flow with MSDASQL

MSDASQL was written because at the time OLE DB was first released, very few data sources were exposed through OLE DB providers. The MSDASQL provider allowed OLE DB applications to be able to talk to data sources for which providers had not yet been written. However, as with any scenario where you increase the length of the code path to complete an operation, talking to a data source via MSDASQL is slower than talking directly with a data source specific provider. We should recommend that customers use data source specific providers wherever possible. In addition, MSDASQL is becoming deprecated. It will not be ported to 64 bit platforms, and will not receive any feature enhancements in future releases.