Resetting an Oracle password through .NET

In case you ever want to reset an Oracle password through ASP.NET, without worrying about pesky things like SQL injection attacks or any other security holes (what could possibly go wrong…)

public void ResetPassword (string pUserName, string pPassWord, string connString) {
       string query = "alter user " + pUserName + " identified by " + pPassWord;
       using (OracleConnection conn = new OracleConnection(connString)) {
           using (OracleCommand comm = new OracleCommand(query, conn)) {
              conn.Open();
              comm.ExecuteNonQuery();
           }
       }
}
Advertisements
  1. Resetting an Oracle password through .NET | SutoCom Solutions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: