Permalink
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (32 sloc) 2.29 KB
title ms.custom ms.date ms.prod ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic ms.assetid caps.latest.revision author ms.author manager
DbProviderFactories
03/30/2017
.net-framework
dotnet-ado
article
2a8e2640-3a49-42a1-a3a9-b43026907ae1
3
JennieHubbard
jhubbard
jhubbard

DbProviderFactories

The xref:System.Data.Common namespace provides classes for creating xref:System.Data.Common.DbProviderFactory instances to work with specific data sources. When you create a xref:System.Data.Common.DbProviderFactory instance and pass it information about the data provider, the DbProviderFactory can determine the correct, strongly typed connection object to return based on the information it has been provided.

Beginning in the .NET Framework version 4, data providers such as xref:System.Data.Odbc, xref:System.Data.OleDb, xref:System.Data.SqlClient, and xref:System.Data.OracleClient are no longer listed in machine.config file, but custom providers will continue to be listed there.

In This Section

Factory Model Overview
Provides an overview of the factory design pattern and programming interface.

Obtaining a DbProviderFactory
Demonstrates how to list the installed data providers and create a xref:System.Data.Common.DbConnection from a DbProviderFactory.

DbConnection, DbCommand and DbException
Demonstrates how to create a xref:System.Data.Common.DbCommand and xref:System.Data.Common.DbDataReader, and how to handle data errors using xref:System.Data.Common.DbException.

Modifying Data with a DbDataAdapter
Demonstrates how to use a xref:System.Data.Common.DbCommandBuilder with a xref:System.Data.Common.DbDataAdapter to retrieve and modify data.

See Also

Retrieving and Modifying Data in ADO.NET
ADO.NET Managed Providers and DataSet Developer Center