title: Saving Insertions into a database
body: <p>I am updating a database using C# &amp; SQL. When I insert a value into the table it exists in the table until I close the connection. How do I save the values that I inserted? Here is the code that I am using: </p>
  
  <pre><code>        conn = new System.Data.SqlClient.SqlConnection();
          conn.ConnectionString = "Data Source=.\\SQLEXPRESS;  AttachDbFilename=|DataDirectory|\\Unmapped.mdf;Integrated Security=True;User Instance=True";            
          string sql = "INSERT into unmappedTeamsTable values ('Value1', 'Value2', 'PW')";
          SqlCommand insertCommand = new SqlCommand(sql, conn);
  
          conn.Open();
          insertCommand.ExecuteNonQuery();
          conn.Close();
  </code></pre>
  
  <p>Thanks</p>