I am using this code to update the database:
var connectionString = ConfigurationManager.ConnectionStrings["MyDatabase"].ConnectionString;
string commandString = string.Empty;
using (OleDbConnection con = new OleDbConnection(connectionString))
{
con.Open();
OleDbCommand command = new OleDbCommand(commandString, con);
commandString = "UPDATE accesscontrol SET enabled=@isEnabled WHERE proxyFor=@userNameInGrid AND currentlyLoggedOnUser=@userName";
command.Parameters.AddWithValue("userName", Environment.UserName);
command.Parameters.AddWithValue("isEnabled", tempPerson.isBool.ToString());
command.Parameters.AddWithValue("userNameInGrid", tempPerson.Name);
command.ExecuteNonQuery();
command.Parameters.Clear();
}