Partager via


AdomdConnection.ChangeDatabase Method

Changes the current database of the open AdomdConnection.

Espace de noms: Microsoft.AnalysisServices.AdomdClient
Assembly: Microsoft.AnalysisServices.AdomdClient (in microsoft.analysisservices.adomdclient.dll)

Syntaxe

'Déclaration
Public Sub ChangeDatabase ( _
    database As String _
)
public void ChangeDatabase (
    string database
)
public:
virtual void ChangeDatabase (
    String^ database
) sealed
public final void ChangeDatabase (
    String database
)
public final function ChangeDatabase (
    database : String
)

Paramètres

  • database
    The name of the database to which the AdomdConnection should connect.

Exceptions

Type d'exception Condition
System.InvalidOperationException

The database parameter is set to a null value, an empty string, or a string containing only spaces.

The AdomdConnection is not connected to a valid session.

Sécurité des threads

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

AdomdConnection Class
AdomdConnection Members
Microsoft.AnalysisServices.AdomdClient Namespace