Password Property (PgSqlConnection)
Gets or sets the user's password to connect.
|
|---|
'Declaration
Public Property Password As String |
|
|---|
public string Password {get; set;} |
Property Value
The user's password to connect.
The following example creates a
PgSqlConnection and displays the password.
|
|---|
public void CreatePgSqlConnection()
{
string myConnString =
"host=server;database=test;user id=postgres;";
PgSqlConnection pgSqlConnection = new PgSqlConnection(myConnString);
pgSqlConnection.Open();
MessageBox.Show("Password: " + pgSqlConnection.Password.ToString());
pgSqlConnection.Close();
} |
|
|---|
Public Sub CreatePgSqlConnection()
Dim myConnString As String = _
"host=server;database=test;user id=postgres;"
Dim pgSqlConnection As New PgSqlConnection(myConnString)
pgSqlConnection.Open()
MessageBox.Show("Password: " + pgSqlConnection.Password.ToString())
pgSqlConnection.Close()
End Sub |