SqlAuthenticationParameters 构造函数

定义

重载

名称 说明
SqlAuthenticationParameters(SqlAuthenticationMethod, String, String, String, String, String, String, Guid)

使用指定的身份验证方法、服务器名称、数据库名称、资源 URI、颁发机构 URI、用户登录名/ID、用户密码和连接 ID 初始化类的新实例 SqlAuthenticationParameters

SqlAuthenticationParameters(SqlAuthenticationMethod, String, String, String, String, String, String, Guid, Int32)

使用所有属性的值构造。

SqlAuthenticationParameters(SqlAuthenticationMethod, String, String, String, String, String, String, Guid)

使用指定的身份验证方法、服务器名称、数据库名称、资源 URI、颁发机构 URI、用户登录名/ID、用户密码和连接 ID 初始化类的新实例 SqlAuthenticationParameters

protected:
 SqlAuthenticationParameters(Microsoft::Data::SqlClient::SqlAuthenticationMethod authenticationMethod, System::String ^ serverName, System::String ^ databaseName, System::String ^ resource, System::String ^ authority, System::String ^ userId, System::String ^ password, Guid connectionId);
protected SqlAuthenticationParameters(Microsoft.Data.SqlClient.SqlAuthenticationMethod authenticationMethod, string serverName, string databaseName, string resource, string authority, string userId, string password, Guid connectionId);
new Microsoft.Data.SqlClient.SqlAuthenticationParameters : Microsoft.Data.SqlClient.SqlAuthenticationMethod * string * string * string * string * string * string * Guid -> Microsoft.Data.SqlClient.SqlAuthenticationParameters
Protected Sub New (authenticationMethod As SqlAuthenticationMethod, serverName As String, databaseName As String, resource As String, authority As String, userId As String, password As String, connectionId As Guid)

参数

authenticationMethod
SqlAuthenticationMethod

指定身份验证方法的枚举值之一。

serverName
String

服务器名称

databaseName
String

数据库名称。

resource
String

资源 URI。

authority
String

颁发机构 URI。

userId
String

用户登录名/ID。

password
String

用户密码。

connectionId
Guid

连接 ID。

适用于

SqlAuthenticationParameters(SqlAuthenticationMethod, String, String, String, String, String, String, Guid, Int32)

Source:
SqlAuthenticationParameters.cs
Source:
SqlAuthenticationParameters.cs
Source:
SqlAuthenticationParameters.cs

使用所有属性的值构造。

protected:
 SqlAuthenticationParameters(Microsoft::Data::SqlClient::SqlAuthenticationMethod authenticationMethod, System::String ^ serverName, System::String ^ databaseName, System::String ^ resource, System::String ^ authority, System::String ^ userId, System::String ^ password, Guid connectionId, int connectionTimeout);
public:
 SqlAuthenticationParameters(Microsoft::Data::SqlClient::SqlAuthenticationMethod authenticationMethod, System::String ^ serverName, System::String ^ databaseName, System::String ^ resource, System::String ^ authority, System::String ^ userId, System::String ^ password, Guid connectionId, int connectionTimeout);
protected SqlAuthenticationParameters(Microsoft.Data.SqlClient.SqlAuthenticationMethod authenticationMethod, string serverName, string databaseName, string resource, string authority, string userId, string password, Guid connectionId, int connectionTimeout);
public SqlAuthenticationParameters(Microsoft.Data.SqlClient.SqlAuthenticationMethod authenticationMethod, string serverName, string databaseName, string resource, string authority, string? userId, string? password, Guid connectionId, int connectionTimeout);
new Microsoft.Data.SqlClient.SqlAuthenticationParameters : Microsoft.Data.SqlClient.SqlAuthenticationMethod * string * string * string * string * string * string * Guid * int -> Microsoft.Data.SqlClient.SqlAuthenticationParameters
Protected Sub New (authenticationMethod As SqlAuthenticationMethod, serverName As String, databaseName As String, resource As String, authority As String, userId As String, password As String, connectionId As Guid, connectionTimeout As Integer)
Public Sub New (authenticationMethod As SqlAuthenticationMethod, serverName As String, databaseName As String, resource As String, authority As String, userId As String, password As String, connectionId As Guid, connectionTimeout As Integer)

参数

authenticationMethod
SqlAuthenticationMethod

身份验证方法。

serverName
String

服务器名称

databaseName
String

数据库名称。

resource
String

资源 URI。

authority
String

颁发机构 URI。

userId
String

用户登录名/ID;如果不适用,则为 null。

password
String

用户密码,如果不适用,则为 null。

connectionId
Guid

连接 ID。

connectionTimeout
Int32

身份验证超时(以秒为单位)。 整体连接超时由驱动程序管理;此超时仅适用于身份验证。

适用于