共用方式為


IDbConnectionExtension.UserName Property

Definition

Gets or sets the username to use when connecting to the database. Overrides any username specified in the connection string.

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

Property Value

The user name to use when authenticating the client.

Remarks

You can set the username and Password in order to specify alternate credentials with which to access the data source.

Applies to