title: Access Database error:: “No value given for one or more required parameters.”
body: <p>I have a datagridview. In this DGV first colum is a combobox column. I want to make, when this combobox value is selected next fild will be filled automatically from database. But there shows a error. </p>
  
  <blockquote>
    <p>No value given for one or more required parameters on
    OleDbDataReader dr1 = cmd1.ExecuteReader();</p>
  </blockquote>
  
  <p>I post the code. Please help me.</p>
  
  <pre><code>OleDbConnection con = new OleDbConnection(conn);
  con.Open();
  
  for (int i = 0; i &lt; dgv.Rows.Count; i++)
  {
  
      string query = "select Description from General where AccCode='" +
          dgv.Rows[i].Cells[0].Value +
          "' and conpanyID='" +
          label1.Text + "'";
      OleDbCommand cmd1 = new OleDbCommand(query, con);
      //OleDbDataAdapter daBranchName = new OleDbDataAdapter(cmd);
      OleDbDataReader dr1 = cmd1.ExecuteReader();
      while (dr1.Read())
      {
          dgv.Rows[i].Cells[1].Value = dr1["Description"].ToString();
      }
  }
  con.Close();
  </code></pre>