title: How to Display data in textbox using MS Access database
body: <p>Im trying to display user data from database into textbox, so that user can edit/update that data later.</p>
  
  <p>Im getting error of <strong>no value has been set for at least one of the required parameters.</strong></p>
  
  <p>I did not write the SELECT * FROM, because i'm not displaying data like AdminRights.</p>
  
  <p>Can you please help me fix the error?</p>
  
  <p>This is my code</p>
  
  <pre><code>private void refresh_Click(object sender, RoutedEventArgs e)
      {
          if (!isPostBack)
          {
              DataTable dt = new DataTable();
              con.Open();
              OleDbDataReader dr = null;
              OleDbCommand cmd = new OleDbCommand("SELECT [Name], [LastName], [UserName], [Password], [Address], [Email] FROM User WHERE [ID] = ?", con);
              dr = cmd.ExecuteReader();
              while (dr.Read())
              {
                  name.Text = (dr["Name"].ToString());
                  lName.Text = (dr["LastName"].ToString());
                  uName.Text = (dr["UserName"].ToString());
                  pass.Text = (dr["Password"].ToString());
                  address.Text = (dr["Address"].ToString());  
                  email.Text = (dr["Email"].ToString());
                  id.Text = (dr["ID"].ToString());
              }
              con.Close();
          }
      }
  </code></pre>