System.Data.SqlClient.SqlConnection.ChangeDatabase Method

Changes the current database for an open System.Data.SqlClient.SqlConnection.

Syntax

public override void ChangeDatabase (string database)

Parameters

database
The name of the database to use instead of the current database.

Remarks

The value supplied in the database parameter must be a valid database name. The database parameter cannot contain a null value, an empty string, or a string with only blank characters.

Requirements

Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0