title: How to insert data into a Microsoft Access Database?
body: <p>I'm trying to insert data into a Microsoft Access Database.</p>
  
  <p>I inserted data into the Access database, but the first and second time are the only times that show the data I inserted. When I rebuild my application, the data I inserted is gone. I don't know where they go and not show. I use C# with the .NET framework to develop. Here's the relevant part of the code:</p>
  
  <pre><code>OleDbConnection con = new OleDbConnection(ConfigurationManager.ConnectionStrings["Constr"].ConnectionString);
  OleDbCommand com = new OleDbCommand();
  com.Connection = con;
  com.CommandText = "Insert into Language(English,Type,Thai) values(@eng,@type,@thai)";
  com.Parameters.AddWithValue("@eng", english);
  com.Parameters.AddWithValue("@type", type);
  com.Parameters.AddWithValue("@thai", thai);
  con.Open();
  com.ExecuteNonQuery();
  </code></pre>
  
  <p>I wrote that code, but I think it is strange. It doesn't show any errors or exceptions, but my data is not inserted correctly. Is this the correct way to insert data? If so, why it it not getting inserted?</p>