Condividi tramite


ServerConnection Constructors

Definition

Overloads

ServerConnection()
ServerConnection(SqlConnection)

Constructs a new ServerConnection object from the given SqlConnection

ServerConnection(IRenewableToken)

Creates a ServerConnection object taking in the token. The extra boolean is used to overload this constructor as another constructor with string is present.

ServerConnection(SqlConnectionInfo)
ServerConnection(SqlConnection)

Constructs a new ServerConnection object from the given SqlConnection

ServerConnection(String)
ServerConnection(SqlConnection, IRenewableToken)

Constructs a new ServerConnection object

ServerConnection(SqlConnection, IRenewableToken)

Constructs a new ServerConnection object

ServerConnection(String, String, SecureString)
ServerConnection(String, String, String)

ServerConnection()

public ServerConnection ();
Public Sub New ()

Applies to

ServerConnection(SqlConnection)

Constructs a new ServerConnection object from the given SqlConnection

public ServerConnection (Microsoft.Data.SqlClient.SqlConnection sqlConnection);
new Microsoft.SqlServer.Management.Common.ServerConnection : Microsoft.Data.SqlClient.SqlConnection -> Microsoft.SqlServer.Management.Common.ServerConnection
Public Sub New (sqlConnection As SqlConnection)

Parameters

sqlConnection
SqlConnection

Applies to

ServerConnection(IRenewableToken)

Creates a ServerConnection object taking in the token. The extra boolean is used to overload this constructor as another constructor with string is present.

public ServerConnection (Microsoft.SqlServer.Management.Common.IRenewableToken token);
new Microsoft.SqlServer.Management.Common.ServerConnection : Microsoft.SqlServer.Management.Common.IRenewableToken -> Microsoft.SqlServer.Management.Common.ServerConnection
Public Sub New (token As IRenewableToken)

Parameters

token
IRenewableToken

An optional access token provider

Applies to

ServerConnection(SqlConnectionInfo)

public ServerConnection (Microsoft.SqlServer.Management.Common.SqlConnectionInfo sci);
new Microsoft.SqlServer.Management.Common.ServerConnection : Microsoft.SqlServer.Management.Common.SqlConnectionInfo -> Microsoft.SqlServer.Management.Common.ServerConnection
Public Sub New (sci As SqlConnectionInfo)

Parameters

Applies to

ServerConnection(SqlConnection)

Constructs a new ServerConnection object from the given SqlConnection

public ServerConnection (System.Data.SqlClient.SqlConnection sqlConnection);
new Microsoft.SqlServer.Management.Common.ServerConnection : System.Data.SqlClient.SqlConnection -> Microsoft.SqlServer.Management.Common.ServerConnection
Public Sub New (sqlConnection As SqlConnection)

Parameters

sqlConnection
SqlConnection

Applies to

ServerConnection(String)

public ServerConnection (string serverInstance);
new Microsoft.SqlServer.Management.Common.ServerConnection : string -> Microsoft.SqlServer.Management.Common.ServerConnection
Public Sub New (serverInstance As String)

Parameters

serverInstance
String

Applies to

ServerConnection(SqlConnection, IRenewableToken)

Constructs a new ServerConnection object

public ServerConnection (Microsoft.Data.SqlClient.SqlConnection sqlConnection, Microsoft.SqlServer.Management.Common.IRenewableToken accessToken);
new Microsoft.SqlServer.Management.Common.ServerConnection : Microsoft.Data.SqlClient.SqlConnection * Microsoft.SqlServer.Management.Common.IRenewableToken -> Microsoft.SqlServer.Management.Common.ServerConnection
Public Sub New (sqlConnection As SqlConnection, accessToken As IRenewableToken)

Parameters

sqlConnection
SqlConnection
accessToken
IRenewableToken

Applies to

ServerConnection(SqlConnection, IRenewableToken)

Constructs a new ServerConnection object

public ServerConnection (System.Data.SqlClient.SqlConnection sqlConnection, Microsoft.SqlServer.Management.Common.IRenewableToken accessToken);
new Microsoft.SqlServer.Management.Common.ServerConnection : System.Data.SqlClient.SqlConnection * Microsoft.SqlServer.Management.Common.IRenewableToken -> Microsoft.SqlServer.Management.Common.ServerConnection
Public Sub New (sqlConnection As SqlConnection, accessToken As IRenewableToken)

Parameters

sqlConnection
SqlConnection
accessToken
IRenewableToken

Applies to

ServerConnection(String, String, SecureString)

public ServerConnection (string serverInstance, string userName, System.Security.SecureString password);
new Microsoft.SqlServer.Management.Common.ServerConnection : string * string * System.Security.SecureString -> Microsoft.SqlServer.Management.Common.ServerConnection
Public Sub New (serverInstance As String, userName As String, password As SecureString)

Parameters

serverInstance
String
userName
String
password
SecureString

Applies to

ServerConnection(String, String, String)

public ServerConnection (string serverInstance, string userName, string password);
new Microsoft.SqlServer.Management.Common.ServerConnection : string * string * string -> Microsoft.SqlServer.Management.Common.ServerConnection
Public Sub New (serverInstance As String, userName As String, password As String)

Parameters

serverInstance
String
userName
String
password
String

Applies to