title: No database filling when using insert into (WPF application)
body: <p>When I try to use the application to add new rows to my database everything goes OK, but when I close the program the database does not contain the newly inserted row.</p>
  
  <p>Below is my code:</p>
  
  <pre><code>string n;
  n = txtNaslov.Text;
  
  SqlConnection con = new SqlConnection("my connection string...");
  
  try
  {
      SqlCommand cmd = new SqlCommand("insert into Table1 values('" + n + "', con);
      //i ve added the other
      con.Open();
      cmd.ExecuteNonQuery();
      con.Close();
  }
  catch (SqlException ex)
  {
  }
  finally
  {
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>