title: how to add current date to sql database using Validate()
body: <p>I have C# programme that takes values from textBoxes and add it to sql database using <code>validate()</code> method on the save button in the BindingNavigator</p>
  
  <pre><code>    private void tableBindingNavigatorSaveItem_Click(object sender, EventArgs e)
      {           
          this.Validate();
          this.tableTiryaqBindingSource.EndEdit();
          this.tableAdapterManager.UpdateAll(this.tiryaqDataSet);           
      }
  </code></pre>
  
  <p>But I need to add the current <code>date</code> to date column without taking it from <code>DateTimePicker</code>.
  the date column don't allow <code>null</code>, I tried this code</p>
  
  <pre><code>    private void tableBindingNavigatorSaveItem_Click(object sender, EventArgs e)
      {           
          this.Validate();
  
          SqlCommand cmd = new SqlCommand("INSERT INTO Table(date) VALUES(@date)", con);
          con.Open();
          cmd.Parameters.AddWithValue("@date", DateTime.Now);
          cmd.ExecuteNonQuery();
          con.Close();
  
          this.tableTiryaqBindingSource.EndEdit();
          this.tableAdapterManager.UpdateAll(this.tiryaqDataSet);           
      }
  </code></pre>
  
  <p>but it gives me null Exception on the date column !! so anybody know how to do it ?</p>