title: Inserting a date/time value in Access using an OleDbParameter
body: <p>I'm trying to do an insert in oledb(ms access database)
  the field called objectdate is date/time</p>
  
  <p>the code i use to add the parameter is this, but i'm getting error.</p>
  
  <pre><code>  OleDbParameter objectdate = new OleDbParameter("@objectdate", OleDbType.DBDate);
    objectdate.Value = DateTime.Now; cmd.Parameters.Add(objectdate);
  </code></pre>
  
  <p>the error:</p>
  
  <blockquote>
    <p>Data type mismatch in criteria expression.</p>
  </blockquote>