title: How to make changes to database
body: <p>How do i change the datatable in database. I am able to delete the rows with my code and see it from datagridview however what do i need to put in to be able to delete it from the database itself.</p>
  
  <pre><code>    using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  using System.Data.OleDb;
  using System.Data.SqlClient;
  using System.Diagnostics;
  
  namespace merge
  {
      public partial class Form1 : Form
      {
          private OleDbConnection connection = new OleDbConnection();//setting connection
  
          public Form1()
          {
              InitializeComponent();
              connection.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=\\ascrfp04\common\General\Interns\Ng Meng Yee Darren\Workorder tracking\workorder tracking\project.accdb;
  Persist Security Info=False;";// connection string from file
          }
  
          private DataTable GetData4()
          {
              DataTable dt4 = new DataTable();
              OleDbDataAdapter da = new OleDbDataAdapter("Select * from [tuas barcode]", connection);
              da.Fill(dt4);
  
              return dt4;
          }
          private void clear_Click(object sender, EventArgs e)
          {
              DataTable dt4 = GetData4();
              foreach (DataRow row in dt4.Rows)
              {
                  row.Delete();
              }
              dataGridView1.DataSource = dt4;
  
          }
      }
  }
  </code></pre>