Hello, we recently purchased dotConnect for PostgreSQL. We're currently using it to connect to a local PostgreSQL database.
Is it possible to change the database account password using the dotConnect software? (i.e. not the password in the connection string, but the password that PostgreSQL server accepts)
Changing the database account password
Re: Changing the database account password
Try this code:
Code: Select all
var conn = new Devart.Data.PostgreSql.PgSqlConnection();
conn.ConnectionString = "...";
conn.Open();
var cmd = conn.CreateCommand();
cmd.CommandText = "ALTER USER username WITH PASSWORD 'newpassword'";
cmd.ExecuteNonQuery();
Re: Changing the database account password
That worked. Thank you!