I'm trying to change passwords of SQL server logins, but the Passwords just won't change. This is what I have:
SqlCommand query = new SqlCommand("ALTER LOGIN @login WITH PASSWORD = '@Pwd'", con);
query.Parameters.Add("@login", SqlDbType.NVarChar, 60).Value = login;
query.Parameters.Add("@Pwd", SqlDbType.NVarChar, 20).Value = _newPwds[login];
query.Prepare();
query.BeginExecuteNonQuery();
I don't get any error messages back from the SQL Server or debugging (Or I don't know how to get them). The Connection is correct and I have the rights to Change Passwords on the Server (Application is running with Integrated Security).
Thanks for your help.