title: SQL insert query in C# does not update database
body: <p>This is my code below. The program runs fine.  I don't get any exceptions. But in the end, the table doesn't contain the newly inserted row. (Note, the connection string is correct).</p>
  
  <pre><code>string Name = "myname";
  string Age = "myage";
  
  string sql = "INSERT INTO Student (Name, Age) VALUES ('" + Name + "','" + Age + "')";
  
  SqlConnection conn = new SqlConnection(ConfigHelper.GetConnectionString());
  SqlCommand cmd = new SqlCommand(sql, conn);
  cmd.ExecuteNonQuery();
  conn.Close();
  </code></pre>