Working with Factories 

The System.Data.Common namespace provides classes for creating DbProviderFactory instances to work with specific databases. When you create a DbProviderFactory instance, passing it information about the provider along with the connection string, the instance can determine the correct strongly-typed object to return based on the information it has been provided. This lets you write code that is not dependent on the data provider and lets you choose the provider at runtime.

In This Section

Obtaining the DbProviderFactory

Provides an example of instantiating a DbProviderFactory.

Creating Commands and Retrieving Data

Provides examples demonstrating how to create commands and retrieve data from a DbProviderFactory.

Retrieving Data with a DbDataAdapter

Provides examples demonstrating how to work a DbProviderFactory.

See Also