System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactory Method

Returns the System.Data.Common.DbProviderFactory object that is associated with the ADO.NET provider that is identified by the SqlDataSource.ProviderName property.

Syntax

protected virtual System.Data.Common.DbProviderFactory GetDbProviderFactory ()

Returns

A System.Data.Common.DbProviderFactory that represents the identified ADO.NET provider; otherwise, and instance of the System.Data.SqlClient, if no provider is set.

Remarks

The System.Data.Common.DbProviderFactory property is used by the System.Web.UI.WebControls.SqlDataSource control to create the correct ADO.NET connection, command, and parameter objects when interacting with a database.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0