title: C# Updating Dataset and DataGridView
body: <p>So im trying to have a DataGridView that is connected to a database, with some text boxes and a button to add more data to the DB. I can have it update the table, but cant get it to properly update the Database.</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;
  
  namespace ParametSampleApp
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
              // TODO: This line of code loads data into the 'database1DataSet.Table' table. You can move, or remove it, as needed.
              this.tableTableAdapter1.Fill(this.database1DataSet.Table);
  
          }
  
          private void btnAdd_Click(object sender, EventArgs e)
          {
              DataRow newUserRow = database1DataSet.Tables["Table"].NewRow();
  
              newUserRow["FirstName"] = txtFName.Text;
              newUserRow["LastName"] = txtLName.Text;
              newUserRow["PostCode"] = txtPostcode.Text;
              newUserRow["OperatingSystem"] = txtOS.Text;
  
              database1DataSet.Tables["Table"].Rows.Add(newUserRow);
  
              this.tableTableAdapter1.Update(this.database1DataSet.Table);
  
          }
      }
  }
  </code></pre>
  
  <p>If you need a ZIP of the whole project to get an easier understanding i can easily upload and send. </p>
  
  <p>It may be worth noting that i used the DataGridView GUI to set up the connection so my DataSet, BindingSource and TableTableAdaper were automatically created aswell. </p>