I have been trying to add user data to a simple database table, and have got this code to work. When I use this code, when I call this method and try to use the data, it works.
public static bool Attempt_CreateUser(string username, string password)
{
try
{
DataTableAdapters.UsersTableAdapter usersTableAdapter = new DataTableAdapters.UsersTableAdapter();
usersTableAdapter.InsertData(username, password);
return true;
}
catch { return false; }
}
The problem is that when I close the application and reopen it, the data that I added previously does not work again. When I check the database, the data has not been added.
How might I go about fixing this?