O'Reilly logo

ADO.NET in a Nutshell by Bill Hamilton, Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The OLE DB Provider

The OLE DB provider interface provides access to a database through an OLE DB provider installed on your computer. Most OLE DB providers are supported, but those that use OLE DB Version 2.5 interfaces aren’t supported. Some unsupported OLE DB interfaces include:

  • OLE DB provider for ODBC (MSDASQL)

  • OLE DB provider for Exchange (ExOLEDB)

  • OLE DB for Internet Publishing (MSDAIPP)

Table A-3 lists some commonly used OLE DB drivers.

Table A-3. Commonly used OLE DB drivers

Name

Description

SQLOLEDB

OLE DB provider for SQL Server

MSDAORA

OLE DB provider for Oracle 7.3 and Oracle 8.

Microsoft.Jet.OLEDB.4.0

OLE DB provider for Access (and other Jet data sources)

All OLE DB types are contained in the System.Data.OleDb namespace (see Table A-4). For low-level information about OLE DB providers, you can refer to the OLE DB programmer’s reference on MSDN at http://msdn.microsoft.com/library/en-us/oledb/htm/oledb_providers_overview.asp.

Table A-4. OLE DB .NET provider classes

Interface

Implementing class

IDbConnection
OleDbConnection
IDbCommand
OleDbCommand

IDataParameter, IDbDataParameter

OleDbParameter

IDataReader, IDataRecord

OleDbDataReader

IDataAdapter, IDbDataAdapter

OleDbDataAdapter
IDbTransaction
OleDbTransaction

The OLE DB managed provider doesn’t include any structures for OLE DB types. However, the OleDbDataReader does include additional methods that allow you to specify the data type when retrieving a column value. Table A-5 shows the mapping ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required