DbConnection.ChangeDatabase Method (String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Changes the current database for an open connection.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

public abstract void ChangeDatabase(
	string databaseName


Type: System.String

Specifies the name of the database for the connection to use.

The value supplied in the databaseName parameter must be a valid database name for the current instance.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top