title: Data Type Mismatch in criteria expression in vb.net with access 2010
body: <pre><code> Dim QRY As String = "SELECT t1.Observer_Name,t1.Company, t2.Safety, t2.T_Name, t2.Trainer_Name," _
                                 + "t2.T_Location, t2.T_Start, t2.T_End,(DateDiff(""d"",T_Start, T_End)+1)*8 as [Man_Hours], t2.Remarks" _
                                 + " FROM ObserverDetails t1,Training t2,TrainningAttendee t3" _
                                 + " WHERE t2.T_ID=t3.T_ID AND t3.Ob_ID=t1.Observer_ID And  t2.T_Start &gt;= @dt1 AND t2.T_Start &lt;= @dt2 "
          cmdSelect.CommandText = QRY
          cmdSelect.Parameters.Add("@dt1", OleDb.OleDbType.Char).Value = DateTimePicker1.Text.Trim
          cmdSelect.Parameters.Add("@dt2", OleDb.OleDbType.Char).Value = DateTimePicker2.Text.Trim
          cmdSelect.CommandType = CommandType.Text
          cmdSelect.Connection = reportConnection4
  
          reader1 = cmdSelect.ExecuteReader
          If reader1.Read Then
              While reader1.Read
                  Dim row As String() = New String() {" " &amp; reader1.Item("Observer_Name") &amp; " ", "" &amp; reader1.Item("Company") &amp; "", " " &amp; reader1.Item("Safety") &amp; " ", " " &amp; reader1.Item("T_Name") &amp; "", _
                                                     "" &amp; reader1.Item("Trainer_Name") &amp; " ", " " &amp; reader1.Item("T_Location") &amp; "", "" &amp; reader1.Item("T_Start") &amp; "", _
                                                     "" &amp; reader1.Item("T_End") &amp; " ", "" &amp; reader1.Item("Man_Hours") &amp; " ", "" &amp; reader1.Item("Remarks") &amp; " "}
                  DataGridView1.Rows.Add(row)
              End While
          End If
  </code></pre>
  
  <p>giving me error
  at <strong>reader = cmdSelect.ExecuteReader</strong>
  error is <strong>Data type mismatch in criteria expression.</strong></p>