title: insert into sql query in wpf
body: <p>Hello everyone i am new in wpf. so i have got problems with it. if you help me, i will be so pleased. thanks everyone in advance.</p>
  
  <p>My problem is, can not insert into  name inside database in wpf. how can i fix it? my codes as follows; </p>
  
  <pre><code>private void button1_Click(object sender, RoutedEventArgs e)
  {       
      try
      {
          string SqlString = "Insert Into UserInformation(name) Values (?)";
          using (OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|Cell.mdb;Persist Security Info=True"))
          {
              using (OleDbCommand cmd = new OleDbCommand(SqlString, conn))
              {
                  cmd.CommandType = CommandType.Text;
                  cmd.Parameters.AddWithValue("name", textBox1.Text);
                  conn.Open();
                  cmd.ExecuteNonQuery();
  
              } 
          }
      }
      catch (Exception ex)
      {  }
  }
  </code></pre>