title: Fetching data for particular Month and year
body: <p>I tried Query(given below in code) But it is showing me this error </p>
  
  <pre><code>No value given for one or more required parameters.
  </code></pre>
  
  <p>but while debugging I am passing date as this </p>
  
  <pre><code>string monthYY = dateTimePickerMonth.Value.ToString("M-yy");
  </code></pre>
  
  <p>So what is the right format to check it ,how can I do it ?</p>
  
  <p><strong>Code for Query</strong> </p>
  
  <pre><code>public int GetDrID_MonthWise(string DrName,string monthYY,int refDrID)
          {
              int data = 0;
              try
              {
                  string sql = "Select d.DoctorID From Doctor_Master d where d.LastName + ' ' + d.FirstName = '" + DrName + "' AND Patient_registration.RegDate='" + monthYY + "' AND Patient_registration.DoctorID=" + refDrID;
                  cmd = new OleDbCommand(sql, acccon);
                  rs = cmd.ExecuteReader();
                  while (rs.Read())
                  {
                      data = Convert.ToInt32(rs[0]);
                  }
              }
              catch (Exception err)
              {
                  MessageBox.Show(err.Message.ToString());
              }
              return data;
          }
  </code></pre>