This topic has not yet been rated - Rate this topic

DbProviderFactory.CreateConnectionStringBuilder Method

Returns a new instance of the provider's class that implements the DbConnectionStringBuilder class.

Namespace:  System.Data.Common
Assembly:  System.Data (in System.Data.dll)
public virtual DbConnectionStringBuilder CreateConnectionStringBuilder()

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Consequence of not implementing this method in your data provider
As this method is virtual, you may think that you have an option of not implementing this method in your .Net Data Provider if functionality implemented in DbConnectionStringBuilder class is sufficient. However, the base method returns null instead of an object of DbConnectionStringBuilder. Hence, connection through Visual Studio to use your data provider with Entity Framework fails while adding ADO.NET Entity Data Model item to your application. To avoid this problem, override this method in your provider factory class and return object of DbConnectionStringBuilder if this class functionality is sufficient or object of your own class derived from DbConnectionStringBuilder.