title: Why two rows getting added to my SQLite database table?
body: <p>When I add data to my SQLite database table using the below code, it adds 2 identical rows to the table for some reason instead of one.</p>
  <pre><code>    using(SQLiteConnection conn= new SQLiteConnection(@&quot;Data Source=&quot;+Path.GetFullPath(&quot;./TestDB.db&quot;)+&quot;;&quot;))
      {
          conn.Open();
  
          SQLiteCommand command = new SQLiteCommand(&quot;INSERT INTO Test(FirstName, LastName, Age) VALUES('Chris','Pine',42)&quot;, conn);
          command.ExecuteNonQuery();
          
          SQLiteDataAdapter adap = new SQLiteDataAdapter(command);
          
          DataTable dt = new DataTable(&quot;Test&quot;);
          adap.Fill(dt);
          
          dataGrid1.ItemsSource=dt.DefaultView;
          adap.Update(dt);
          
          conn.Close();
  
      }
      
      MessageBox.Show(&quot;Complete!&quot;);
      refreshdata();
  </code></pre>
  <p>Why is this happening ?</p>
  <p>Also, the code for refreshdata</p>
  <pre><code>public void refreshdata()
  {
      
      using(SQLiteConnection conn= new SQLiteConnection(@&quot;Data Source=&quot;+Path.GetFullPath(&quot;./TestDB.db&quot;)+&quot;;&quot;))
          
      {
          conn.Open();
  
          SQLiteCommand command = new SQLiteCommand(&quot;Select * from Test&quot;, conn);
          command.ExecuteNonQuery();
          
          SQLiteDataAdapter adap = new SQLiteDataAdapter(command);
          
          DataTable dt = new DataTable(&quot;Test&quot;);
          adap.Fill(dt);
          
          dataGrid1.ItemsSource=dt.DefaultView;
          adap.Update(dt);
          
          conn.Close();
  
      }
  </code></pre>