我一直在撞墙并不断收到一个模糊的错误“UPDATE语句中的语法错误”。谁能告诉我我的更新声明有什么问题?
try
{
OleDbConnection ECon = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\zoofari\zoofari\zoofari\bin\Debug\MainData.accdb");
OleDbDataAdapter EdAdapt = new OleDbDataAdapter();
EdAdapt.UpdateCommand = new OleDbCommand("UPDATE tbl_Results SET @Q1-Easy WHERE Username = '" +txtUname.Text+ "'", ECon);
EdAdapt.UpdateCommand.Parameters.Add("@Q1-Easy", OleDbType.Boolean).Value = true;
ECon.Open();
EdAdapt.UpdateCommand.ExecuteNonQuery();
ECon.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}