title: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0
body: <p>Here's a part of the code..</p>
  
  <p>//HERE'S FOR INSERT</p>
  
  <pre><code>OleDbCommand command = new OleDbCommand();
  
  command.CommandText = "INSERT INTO tblUsersAccount (Username,[Password],Firstname,     MiddleName, Lastname,Birthday,ContactNo,DateCreated,DateModified) values (@Username,@Password,@Firstname,@MiddleName,@Lastname,@Birthday,@ContactNo,@DateCreated,@DateModified)";
  
  command.Parameters.Add("@Username", OleDbType.Char).Value = tbUsername.Text;
  command.Parameters.Add("@Password", OleDbType.Char).Value = tbPassword.Text;
  command.Parameters.Add("@Firstname", OleDbType.Char).Value = tbFirstname.Text;
  command.Parameters.Add("@MiddleName", OleDbType.Char).Value = tbMiddleName.Text;
  command.Parameters.Add("@Lastname", OleDbType.Char).Value = tbLastname.Text;
  command.Parameters.Add("@Birthday", OleDbType.Date).Value =DateTime.Parse(tbBirthday.Text);
  command.Parameters.Add("@ContactNo", OleDbType.Char).Value = tbContactNo.Text;
  command.Parameters.Add("@DateCreated", OleDbType.Date).Value = DateTime.Now;
  command.Parameters.Add("@DateModified", OleDbType.Date).Value = DateTime.Now;
  command.ExecuteNonQuery();
  </code></pre>
  
  <p>//HERE'S FOR UPDATE</p>
  
  <pre><code>OleDbCommand command = new OleDbCommand();
  
  command.CommandText = "UPDATE tblUsersAccount SET Password = ?, Firstname = ?, MiddleName = ?, Lastname = ?, Birthday = ?, ContactNo = ? WHERE Username = ?";
  
  connect.ConnectionString = connectionString;
  connect.Open();
  command.Connection = connect;
  
  command.Parameters.Add("@Username", OleDbType.Char).Value = tbUsername.Text;
  command.Parameters.Add("@Password", OleDbType.Char).Value = tbPassword.Text;
  command.Parameters.Add("@Firstname", OleDbType.Char).Value = tbFirstname.Text;
  command.Parameters.Add("@MiddleName", OleDbType.Char).Value = tbMiddleName.Text;
  command.Parameters.Add("@Lastname", OleDbType.Char).Value = tbLastname.Text;
  command.Parameters.Add("@Birthday", OleDbType.Date).Value =DateTime.Parse(tbBirthday.Text);
  command.Parameters.Add("@ContactNo", OleDbType.Char).Value = tbContactNo.Text;
  command.ExecuteNonQuery();
  </code></pre>
  
  <p>problem #1: having an error in the update part. the error says, "The string was not recognized as a valid DateTime. There is an unknown word starting at index 0." which is on the birthday part. even if date is in correct format like 09/08/11. which works in insert part.</p>
  
  <p>problem #2: when i tried to remove the birthday part to see if there's some errors other than on problem #1, here's the error "Syntax error in update statement." </p>
  
  <p>sorry.. im just new to programming. and thanks for the help. God bless.</p>