Condividi tramite


Proprietà ConnectionSettings.ConnectAsUserName

Gets or sets the name of the user when connecting using impersonation.

Spazio dei nomi  Microsoft.SqlServer.Management.Common
Assembly:  Microsoft.SqlServer.ConnectionInfo (in Microsoft.SqlServer.ConnectionInfo.dll)

Sintassi

'Dichiarazione
Public Property ConnectAsUserName As String 
    Get 
    Set
'Utilizzo
Dim instance As ConnectionSettings 
Dim value As String 

value = instance.ConnectAsUserName

instance.ConnectAsUserName = value
public string ConnectAsUserName { get; set; }
public:
property String^ ConnectAsUserName {
    String^ get ();
    void set (String^ value);
}
member ConnectAsUserName : string with get, set
function get ConnectAsUserName () : String 
function set ConnectAsUserName (value : String)

Valore proprietà

Tipo: String
A String value that specifies the user name used when the connection is established using impersonation of a user.

Osservazioni

If the ConnectAsUser property is set to True, the ConnectAsUserName property and the ConnectAsUserPassword property are used to acquire credentials for impersonation. Any subsequent connection is made with the credentials of the specified user, and the LoginSecure property, the Login property, and the Password property are ignored.

Vedere anche

Riferimento

ConnectionSettings Classe

Spazio dei nomi Microsoft.SqlServer.Management.Common