title: ORA-01036: illegal variable name/number when running query through C#
body: <p>I am trying to use <code>ALTER USER</code> query for Oracle database using OracleCommand in C# in the following code. It creates the query if the values for Username and password are not empty strings. But I get an error <code>"ORA-01036: illegal variable name/number"</code> when <code>ExecuteNonQuery()</code> is executed.</p>
  
  <pre><code>  string updateQuery = "ALTER USER :user IDENTIFIED BY :password";
    connection = new OracleConnection(LoginPage.connectionString);
    connection.Open();                
    OracleCommand cmd = new OracleCommand(updateQuery, connection);
    cmd.Connection = connection;  
    for(int i=0;i&lt;usersList.Count;i++)
          {
              if (!(selectedUsersArray[i].Equals("")) &amp;&amp; !passwordArray[i].Equals(""))
              {
                  OracleParameter userName = new OracleParameter();
                  userName.ParameterName = "user";
                  userName.Value = selectedUsersArray[i];
  
                  OracleParameter passwd = new OracleParameter();
                  passwd.ParameterName = "password";
                  passwd.Value = passwordArray[i];
  
                  cmd.Parameters.Add(userName);
                  cmd.Parameters.Add(passwd);
  
                  cmd.Prepare();
                  cmd.ExecuteNonQuery();                   
  
  
              }
          }
  </code></pre>
  
  <p>Could you please suggest what is wrong with my implementation?.</p>