-1
没有错误,我使用此代码更新数据库:我的Access数据库不会更新。在代码
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 [email protected] WHERE [email protected] AND [email protected]";
command.Parameters.AddWithValue("userName", Environment.UserName);
command.Parameters.AddWithValue("isEnabled", tempPerson.isBool.ToString());
command.Parameters.AddWithValue("userNameInGrid", tempPerson.Name);
command.ExecuteNonQuery();
command.Parameters.Clear();
}
我所做的更改,并表未更新 –
@ softwareisfun请参阅我的更新 – Marusyk
@softwareisfun任何消息?它有帮助吗? – Marusyk