title: Error: Syntax error in INSERT INTO statement in command.ExecuteNonQuery()
body: <p>I get the error <code>Syntax error in INSERT INTO statement</code> in following line <code>command.ExecuteNonQuery();</code></p>
  
  <p>BTW, I already red some similar posts and I tried to fix my problem but I could not able to do so.</p>
  
  <p>My database is <code>MS Access</code>.</p>
  
  <p>Any help will be great!</p>
  
  <pre><code>private void btn_register_Click(object sender, EventArgs e)
          {
              if (string.IsNullOrEmpty(txt_name.Text) || string.IsNullOrEmpty(txt_family.Text))
              {
                  MessageBox.Show("Some information is missed");
              }
              else
              {
                  this.Hide();
                  connection.Open();
                  OleDbCommand command = new OleDbCommand();
                  command.Connection = connection;
                  command.CommandText = " insert into Login (FirstName,FamilyName,UserName,PassWord,RepeatPassword,Email,MaxTime,LearningStyle) values ('" + txt_name.Text + "','" + txt_family.Text + "','" + txt_username.Text + "','" + txt_password.Text + "','" + txt_repeat.Text + "','" + txt_mail.Text + "','" + UpDownTime.Value + "','" + UpDownLearningStyle.Value + "')";
                  command.ExecuteNonQuery();
                  MessageBox.Show("Your Registeration was successfull !");
                  connection.Close();
                  Login F1 = new Login();
                  F1.Show();  
  
              }
  
          }
  </code></pre>