SqlConnectionStringBuilder.UserID 属性

定义

获取或设置连接到 SQL Server 时要使用的用户 ID。

public:
 property System::String ^ UserID { System::String ^ get(); void set(System::String ^ value); };
public string UserID { get; set; }
member this.UserID : string with get, set
Public Property UserID As String

属性值

属性的值 UserID ,或者 String.Empty 未提供任何值。

例外

若要将值设置为 null,请使用 Value

注解

此属性对应于连接字符串中的“用户 ID”、“user”和“uid”键。

适用于

另请参阅