Share via


Server.ConnectionContext Property

Gets the current server connection details for the instance of Microsoft SQL Server.

Espace de noms: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntaxe

'Déclaration
Public ReadOnly Property ConnectionContext As ServerConnection
public ServerConnection ConnectionContext { get; }
public:
property ServerConnection^ ConnectionContext {
    ServerConnection^ get ();
}
/** @property */
public ServerConnection get_ConnectionContext ()
public function get ConnectionContext () : ServerConnection

Valeur de propriété

A ServerConnection object that specifies the details of the current connection to the instance of SQL Server.

Notes

Texte mis à jour :

Texte mis à jour :

This property can be used to change connection settings, such as the name of the instance of SQL Server or the authentication type. The ConnectionContext property is represented by the ServerConnection class. When connecting to the local instance of SQL Server by using Windows authentication, the default values are used. You do not have to set any properties.

Cet espace de noms, cette classe ou ce membre est pris en charge uniquement par la version 2.0 de Microsoft .NET Framework.

Exemple

How to: Connect to a Remote Instance of SQL Server by Using Windows Authentication in Visual Basic .NET

How to: Copy an SMO Object in Visual Basic .NET

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

Server Class
Server Members
Microsoft.SqlServer.Management.Smo Namespace

Autres ressources

Connecting to an Instance of SQL Server
Disconnecting from an Instance of SQL Server
Gestion des serveurs