My application does not save data to the database <p>I have tried to create a C# application that saves data to an existing local SQL database. I created a local database called <code>AccountDatabase.mdf</code> which has a table called <code>AccountTable</code> in it. I first started with an empty table. I then used the code below to get the application to save the input data to the database.</p> <pre><code>private void FPAccountNotExist_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { //Make forgot password page invisible and create new account page visible ForgotPassword.Visible = false; CreateNewAccount.Visible = true; //Set text content of labels on create new account page CreateNewAccountTitle.Text = "Create New Account"; CNAConfirmLabel.Text = "Confirm Password"; CNAEmailLabel.Text = "Email"; CNAInstruction.Text = "Please fill in the following details."; CNAOpenAccount.Text = "Submit new account"; CNAPasswordLabel.Text = "Password"; CNAUsernameLabel.Text = "Username"; OpenManual.Text = "Start with Manual"; CNAConfirmTextBox.UseSystemPasswordChar = true; CNAPasswordTextBox.UseSystemPasswordChar = true; </code></pre> <p>}</p> <pre><code>private void CNAOpenAccount_Click(object sender, EventArgs e) { AccountVariables.ConfirmedPassword = CNAConfirmTextBox.Text; AccountVariables.Email = CNAEmailTextBox.Text; AccountVariables.Password = CNAPasswordTextBox.Text; AccountVariables.Username = CNAUsernameTextBox.Text; //GeneralVariables.ManualOption = OpenManual.Checked; var CreateNewAccountStrings = new List&lt;string&gt; { AccountVariables.ConfirmedPassword, AccountVariables.Password, AccountVariables.Email, AccountVariables.Username }; if (CreateNewAccountStrings.Contains("")) { MessageBox.Show("All textboxes should be filled"); } else { if ((AccountVariables.ConfirmedPassword == AccountVariables.Password) &amp;&amp; (AccountVariables.Password.Length &gt;= 8)) { accountTableTableAdapter.Fill(accountDatabaseDataSet.AccountTable); AccountVariables.defaultAccountRow = AccountVariables.defaultAccountRow + 1; AccountVariables.newAccountTableRow = accountDatabaseDataSet.AccountTable.NewAccountTableRow(); AccountVariables.newAccountTableRow.UserId = AccountVariables.defaultAccountRow; AccountVariables.newAccountTableRow.Username = AccountVariables.Username; AccountVariables.newAccountTableRow.Email = AccountVariables.Email; AccountVariables.newAccountTableRow.Password = AccountVariables.Password; accountDatabaseDataSet.AccountTable.AddAccountTableRow(AccountVariables.newAccountTableRow); accountTableTableAdapter.Update(accountDatabaseDataSet.AccountTable); accountDatabaseDataSet.AccountTable.AcceptChanges(); AccountVariables.AccountDatabaseConnection.Close(); } } } </code></pre> <p>However, when I closed the program after running the application, I looked in the database and saw that the rows had not been saved, even after I have saved it. Please can you help me solve this problem.</p>