title: Insert date into database winforms
body: <p>I am trying to insert a row in my table with a bunch of data, including a date (using the Date type field)</p>
  
  <p>The input is received from a usercontrol and then put into parameters:</p>
  
  
  
  <pre><code>        cmd.Parameters.AddWithValue("titel", titel);
          cmd.Parameters.AddWithValue("dvu" , dvu );
          cmd.Parameters.AddWithValue("genre", genreID);
          cmd.Parameters.AddWithValue("paginas", paginas);
          cmd.Parameters.AddWithValue("taal", taalID);
          cmd.Parameters.AddWithValue("isbn13", isbn13);
          cmd.Parameters.AddWithValue("isbn10", isbn10);
          cmd.Parameters.AddWithValue("uitgever", uitgever);
          cmd.Parameters.AddWithValue("auteur", auteurID);
          cmd.Parameters.AddWithValue("bindwijze", bindwijzeID);
  </code></pre>
  
  <p>As shown above, the 'dvu' is the date to be added. It's format entered is DD-MM-YYYY. However, when I execute the query as follows:</p>
  
  <pre><code>        conn.Open();
          cmd.CommandText = "INSERT INTO Boek (ItemID, AuteurID, BoekGenreID,
          BindwijzeID, TaalID, ISBN10, ISBN13, AantalPagina) 
          VALUES (@itemID, @auteur, @genre, @bindwijze, 
          @taal, @isbn10, @isbn13, @paginas);";
          cmd.ExecuteNonQuery();
          conn.Close();
  </code></pre>
  
  <p>The date does not get inserted into the database, where as the other data does get inserted.</p>
  
  <p>How can I fix this?</p>
  
  <p>Edit: Fixed. I totally forgot to include them in my query! :/ Sorry!</p>