title: MS Access database clears all data every time after press "Re-Build Solution" in 'Build' menu in the application
body: <p>I have read the old solution given to change the property of database .accdb <code>copy to output dictionary</code>. Already done that and after this problem arise.Data inserted properly in database.
  After closing the application and re-run the application, the inserted data is showing in database as well as in gridView. But after re-build the application the data is lost.</p>
  
  <pre><code>    private OleDbConnection conn;
      private OleDbCommand cmd = new OleDbCommand();
      private String connString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Data.accdb";
      private String query;       
  
      public workers()
      {
          conn = new OleDbConnection(connString);
          cmd.Connection = conn;
          InitializeComponent();
      }
  
      private void button1_Click(object sender, EventArgs e)
      {            
          conn.Open();
          cmd.Connection = conn;  
  
          query = "INSERT into workers(`w_name`,`w_salary`,`w_daysal`,`w_credit`,`w_leave`,`w_remain`) values(@w_name,@w_salary,@w_daysal,@w_credit,@w_leave,@w_remain);";
  
              cmd = new OleDbCommand(query, conn);
  
              cmd.Parameters.Add("@w_name", OleDbType.VarChar).Value = nameTxt.Text;
              cmd.Parameters.Add("@w_salary", OleDbType.VarChar).Value = salaryTxt.Text;
              cmd.Parameters.Add("@w_daysal", OleDbType.VarChar).Value = creditTxt.Text;
              cmd.Parameters.Add("@w_credit", OleDbType.VarChar).Value = daysalTxt.Text;
              cmd.Parameters.Add("@w_leave", OleDbType.VarChar).Value = leaveTxt.Text;
              cmd.Parameters.Add("@w_remain", OleDbType.VarChar).Value = remainTxt.Text;
  
         try
         {
             cmd.ExecuteNonQuery();
             MessageBox.Show("Data Added");
             BindGrid();
  
             clearData();
          }
          catch (Exception e1)
          {
              MessageBox.Show(e1.Message);
          }
      }
  
      private void BindGrid()
      {            
          conn = new OleDbConnection(connString);
          string sql = "SELECT * FROM workers";
          OleDbCommand cmd = new OleDbCommand(sql, conn);
  
          OleDbDataAdapter da = new OleDbDataAdapter(cmd);
          DataSet ds = new DataSet();
          da.Fill(ds, "table");            
  
          dataGridView1.DataSource = ds;
          dataGridView1.DataMember = "table";
          dataGridView1.Update();
          dataGridView1.Refresh();
  
          nameTxt.Focus(); 
      }
  </code></pre>